@treeseed/cli 0.1.1 → 0.4.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/README.md +27 -26
- package/dist/cli/handlers/auth-login.d.ts +2 -0
- package/dist/cli/handlers/auth-login.js +67 -0
- package/dist/cli/handlers/auth-logout.d.ts +2 -0
- package/dist/cli/handlers/auth-logout.js +20 -0
- package/dist/cli/handlers/auth-whoami.d.ts +2 -0
- package/dist/cli/handlers/auth-whoami.js +24 -0
- package/dist/cli/handlers/close.js +19 -53
- package/dist/cli/handlers/config.js +33 -53
- package/dist/cli/handlers/destroy.js +34 -79
- package/dist/{src/cli/handlers/ship.d.ts → cli/handlers/dev.d.ts} +1 -1
- package/dist/cli/handlers/dev.js +19 -0
- package/dist/cli/handlers/doctor.js +13 -6
- package/dist/cli/handlers/init.js +32 -8
- package/dist/cli/handlers/release.js +21 -53
- package/dist/cli/handlers/rollback.js +8 -8
- package/dist/cli/handlers/save.js +21 -79
- package/dist/cli/handlers/stage.d.ts +2 -0
- package/dist/cli/handlers/stage.js +28 -0
- package/dist/cli/handlers/status.js +35 -26
- package/dist/{src/cli/handlers/deploy.d.ts → cli/handlers/switch.d.ts} +1 -1
- package/dist/cli/handlers/switch.js +29 -0
- package/dist/{src/cli/handlers/next.d.ts → cli/handlers/sync.d.ts} +1 -1
- package/dist/cli/handlers/sync.js +26 -0
- package/dist/cli/handlers/tasks.d.ts +2 -0
- package/dist/cli/handlers/tasks.js +31 -0
- package/dist/cli/handlers/template.d.ts +2 -0
- package/dist/cli/handlers/template.js +27 -0
- package/dist/cli/handlers/workflow.d.ts +6 -0
- package/dist/cli/handlers/workflow.js +71 -0
- package/dist/{src/cli → cli}/help.d.ts +2 -2
- package/dist/cli/help.js +36 -24
- package/dist/cli/main.d.ts +6 -0
- package/dist/cli/main.js +14 -19
- package/dist/cli/operations-help.d.ts +1 -0
- package/dist/cli/operations-help.js +1 -0
- package/dist/cli/operations-parser.d.ts +1 -0
- package/dist/cli/operations-parser.js +1 -0
- package/dist/cli/operations-registry.d.ts +5 -0
- package/dist/cli/operations-registry.js +260 -0
- package/dist/cli/operations-types.d.ts +72 -0
- package/dist/cli/parser.d.ts +3 -0
- package/dist/cli/parser.js +1 -6
- package/dist/cli/registry.d.ts +25 -0
- package/dist/cli/registry.js +28 -416
- package/dist/cli/repair.js +6 -4
- package/dist/cli/runtime.d.ts +31 -0
- package/dist/cli/runtime.js +240 -111
- package/dist/cli/types.d.ts +1 -0
- package/dist/{src/cli → cli}/workflow-state.d.ts +9 -0
- package/dist/cli/workflow-state.js +45 -21
- package/package.json +13 -13
- package/dist/cli/handlers/continue.js +0 -23
- package/dist/cli/handlers/deploy.js +0 -139
- package/dist/cli/handlers/next.js +0 -27
- package/dist/cli/handlers/prepare.js +0 -8
- package/dist/cli/handlers/promote.js +0 -8
- package/dist/cli/handlers/publish.js +0 -8
- package/dist/cli/handlers/setup.js +0 -48
- package/dist/cli/handlers/ship.js +0 -49
- package/dist/cli/handlers/start.js +0 -97
- package/dist/cli/handlers/teardown.js +0 -50
- package/dist/cli/handlers/work.js +0 -85
- package/dist/scripts/aggregate-book.d.ts +0 -1
- package/dist/scripts/aggregate-book.js +0 -121
- package/dist/scripts/assert-release-tag-version.d.ts +0 -1
- package/dist/scripts/assert-release-tag-version.js +0 -21
- package/dist/scripts/build-dist.d.ts +0 -1
- package/dist/scripts/build-dist.js +0 -108
- package/dist/scripts/build-tenant-worker.d.ts +0 -1
- package/dist/scripts/build-tenant-worker.js +0 -36
- package/dist/scripts/cleanup-markdown.d.ts +0 -2
- package/dist/scripts/cleanup-markdown.js +0 -373
- package/dist/scripts/config-runtime-lib.d.ts +0 -122
- package/dist/scripts/config-runtime-lib.js +0 -505
- package/dist/scripts/config-treeseed.d.ts +0 -2
- package/dist/scripts/config-treeseed.js +0 -81
- package/dist/scripts/d1-migration-lib.d.ts +0 -6
- package/dist/scripts/d1-migration-lib.js +0 -90
- package/dist/scripts/deploy-lib.d.ts +0 -127
- package/dist/scripts/deploy-lib.js +0 -841
- package/dist/scripts/ensure-mailpit.d.ts +0 -1
- package/dist/scripts/ensure-mailpit.js +0 -29
- package/dist/scripts/git-workflow-lib.d.ts +0 -25
- package/dist/scripts/git-workflow-lib.js +0 -136
- package/dist/scripts/github-automation-lib.d.ts +0 -156
- package/dist/scripts/github-automation-lib.js +0 -242
- package/dist/scripts/local-dev-lib.d.ts +0 -9
- package/dist/scripts/local-dev-lib.js +0 -84
- package/dist/scripts/local-dev.d.ts +0 -1
- package/dist/scripts/local-dev.js +0 -129
- package/dist/scripts/logs-mailpit.d.ts +0 -1
- package/dist/scripts/logs-mailpit.js +0 -2
- package/dist/scripts/mailpit-runtime.d.ts +0 -4
- package/dist/scripts/mailpit-runtime.js +0 -57
- package/dist/scripts/package-tools.d.ts +0 -22
- package/dist/scripts/package-tools.js +0 -255
- package/dist/scripts/patch-starlight-content-path.d.ts +0 -1
- package/dist/scripts/patch-starlight-content-path.js +0 -172
- package/dist/scripts/paths.d.ts +0 -17
- package/dist/scripts/paths.js +0 -26
- package/dist/scripts/publish-package.d.ts +0 -1
- package/dist/scripts/publish-package.js +0 -19
- package/dist/scripts/release-verify.d.ts +0 -1
- package/dist/scripts/release-verify.js +0 -136
- package/dist/scripts/run-fixture-astro-command.d.ts +0 -1
- package/dist/scripts/run-fixture-astro-command.js +0 -18
- package/dist/scripts/save-deploy-preflight-lib.d.ts +0 -34
- package/dist/scripts/save-deploy-preflight-lib.js +0 -69
- package/dist/scripts/scaffold-site.d.ts +0 -2
- package/dist/scripts/scaffold-site.js +0 -92
- package/dist/scripts/stop-mailpit.d.ts +0 -1
- package/dist/scripts/stop-mailpit.js +0 -5
- package/dist/scripts/sync-dev-vars.d.ts +0 -1
- package/dist/scripts/sync-dev-vars.js +0 -6
- package/dist/scripts/template-registry-lib.d.ts +0 -47
- package/dist/scripts/template-registry-lib.js +0 -137
- package/dist/scripts/tenant-astro-command.d.ts +0 -1
- package/dist/scripts/tenant-astro-command.js +0 -3
- package/dist/scripts/tenant-build.d.ts +0 -1
- package/dist/scripts/tenant-build.js +0 -16
- package/dist/scripts/tenant-check.d.ts +0 -1
- package/dist/scripts/tenant-check.js +0 -7
- package/dist/scripts/tenant-d1-migrate-local.d.ts +0 -1
- package/dist/scripts/tenant-d1-migrate-local.js +0 -11
- package/dist/scripts/tenant-deploy.d.ts +0 -2
- package/dist/scripts/tenant-deploy.js +0 -180
- package/dist/scripts/tenant-destroy.d.ts +0 -2
- package/dist/scripts/tenant-destroy.js +0 -104
- package/dist/scripts/tenant-dev.d.ts +0 -1
- package/dist/scripts/tenant-dev.js +0 -171
- package/dist/scripts/tenant-lint.d.ts +0 -1
- package/dist/scripts/tenant-lint.js +0 -4
- package/dist/scripts/tenant-test.d.ts +0 -1
- package/dist/scripts/tenant-test.js +0 -4
- package/dist/scripts/test-cloudflare-local.d.ts +0 -1
- package/dist/scripts/test-cloudflare-local.js +0 -212
- package/dist/scripts/test-scaffold.d.ts +0 -2
- package/dist/scripts/test-scaffold.js +0 -297
- package/dist/scripts/treeseed.d.ts +0 -2
- package/dist/scripts/treeseed.js +0 -4
- package/dist/scripts/validate-templates.d.ts +0 -2
- package/dist/scripts/validate-templates.js +0 -4
- package/dist/scripts/watch-dev-lib.d.ts +0 -21
- package/dist/scripts/watch-dev-lib.js +0 -277
- package/dist/scripts/workspace-close.d.ts +0 -2
- package/dist/scripts/workspace-close.js +0 -24
- package/dist/scripts/workspace-command-e2e.d.ts +0 -2
- package/dist/scripts/workspace-command-e2e.js +0 -718
- package/dist/scripts/workspace-lint.d.ts +0 -1
- package/dist/scripts/workspace-lint.js +0 -9
- package/dist/scripts/workspace-preflight-lib.d.ts +0 -36
- package/dist/scripts/workspace-preflight-lib.js +0 -179
- package/dist/scripts/workspace-preflight.d.ts +0 -2
- package/dist/scripts/workspace-preflight.js +0 -22
- package/dist/scripts/workspace-publish-changed-packages.d.ts +0 -1
- package/dist/scripts/workspace-publish-changed-packages.js +0 -16
- package/dist/scripts/workspace-release-verify.d.ts +0 -1
- package/dist/scripts/workspace-release-verify.js +0 -81
- package/dist/scripts/workspace-release.d.ts +0 -2
- package/dist/scripts/workspace-release.js +0 -42
- package/dist/scripts/workspace-save-lib.d.ts +0 -42
- package/dist/scripts/workspace-save-lib.js +0 -220
- package/dist/scripts/workspace-save.d.ts +0 -2
- package/dist/scripts/workspace-save.js +0 -124
- package/dist/scripts/workspace-start-warning.js +0 -3
- package/dist/scripts/workspace-start.d.ts +0 -2
- package/dist/scripts/workspace-start.js +0 -71
- package/dist/scripts/workspace-test-unit.d.ts +0 -1
- package/dist/scripts/workspace-test-unit.js +0 -4
- package/dist/scripts/workspace-test.d.ts +0 -1
- package/dist/scripts/workspace-test.js +0 -11
- package/dist/scripts/workspace-tools.d.ts +0 -13
- package/dist/scripts/workspace-tools.js +0 -226
- package/dist/src/cli/handlers/continue.d.ts +0 -2
- package/dist/src/cli/handlers/prepare.d.ts +0 -2
- package/dist/src/cli/handlers/promote.d.ts +0 -2
- package/dist/src/cli/handlers/publish.d.ts +0 -2
- package/dist/src/cli/handlers/setup.d.ts +0 -2
- package/dist/src/cli/handlers/start.d.ts +0 -3
- package/dist/src/cli/handlers/teardown.d.ts +0 -2
- package/dist/src/cli/handlers/work.d.ts +0 -2
- package/dist/src/cli/main.d.ts +0 -6
- package/dist/src/cli/parser.d.ts +0 -3
- package/dist/src/cli/registry.d.ts +0 -27
- package/dist/src/cli/runtime.d.ts +0 -4
- package/dist/src/cli/types.d.ts +0 -71
- /package/dist/{src/cli → cli}/handlers/close.d.ts +0 -0
- /package/dist/{src/cli → cli}/handlers/config.d.ts +0 -0
- /package/dist/{src/cli → cli}/handlers/destroy.d.ts +0 -0
- /package/dist/{src/cli → cli}/handlers/doctor.d.ts +0 -0
- /package/dist/{src/cli → cli}/handlers/init.d.ts +0 -0
- /package/dist/{src/cli → cli}/handlers/release.d.ts +0 -0
- /package/dist/{src/cli → cli}/handlers/rollback.d.ts +0 -0
- /package/dist/{src/cli → cli}/handlers/save.d.ts +0 -0
- /package/dist/{src/cli → cli}/handlers/status.d.ts +0 -0
- /package/dist/{src/cli → cli}/handlers/utils.d.ts +0 -0
- /package/dist/{scripts/workspace-start-warning.d.ts → cli/operations-types.js} +0 -0
- /package/dist/{src/cli → cli}/repair.d.ts +0 -0
- /package/dist/{src/index.d.ts → index.d.ts} +0 -0
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import { copyFileSync, existsSync, mkdirSync, readdirSync, readFileSync, rmSync, writeFileSync, chmodSync } from 'node:fs';
|
|
2
|
-
import { dirname, extname, join, relative, resolve } from 'node:path';
|
|
3
|
-
import { build } from 'esbuild';
|
|
4
|
-
import ts from 'typescript';
|
|
5
|
-
import { packageRoot } from './package-tools.js';
|
|
6
|
-
const srcRoot = resolve(packageRoot, 'src');
|
|
7
|
-
const scriptsRoot = resolve(packageRoot, 'scripts');
|
|
8
|
-
const distRoot = resolve(packageRoot, 'dist');
|
|
9
|
-
const COPY_EXTENSIONS = new Set(['.d.js', '.json', '.md']);
|
|
10
|
-
function walkFiles(root) {
|
|
11
|
-
const files = [];
|
|
12
|
-
for (const entry of readdirSync(root, { withFileTypes: true })) {
|
|
13
|
-
const fullPath = join(root, entry.name);
|
|
14
|
-
if (entry.isDirectory())
|
|
15
|
-
files.push(...walkFiles(fullPath));
|
|
16
|
-
else
|
|
17
|
-
files.push(fullPath);
|
|
18
|
-
}
|
|
19
|
-
return files;
|
|
20
|
-
}
|
|
21
|
-
function ensureDir(filePath) {
|
|
22
|
-
mkdirSync(dirname(filePath), { recursive: true });
|
|
23
|
-
}
|
|
24
|
-
function rewriteRuntimeSpecifiers(contents, outputFile = null) {
|
|
25
|
-
let rewritten = contents
|
|
26
|
-
.replace(/(['"`])(\.[^'"`\n]+)\.(mjs|ts)\1/g, '$1$2.js$1')
|
|
27
|
-
.replace(/(['"`])\.\.\/src\//g, '$1../');
|
|
28
|
-
if (!outputFile || outputFile.includes(`${resolve(distRoot, 'scripts')}`)) {
|
|
29
|
-
return rewritten;
|
|
30
|
-
}
|
|
31
|
-
rewritten = rewritten.replace(/(['"`])((?:\.\.\/)+scripts\/([^'"`\n]+))\1/g, (_match, quote, _specifier, scriptPath) => {
|
|
32
|
-
const targetPath = resolve(distRoot, 'scripts', scriptPath);
|
|
33
|
-
let relativeSpecifier = relative(dirname(outputFile), targetPath).replaceAll('\\', '/');
|
|
34
|
-
if (!relativeSpecifier.startsWith('.')) {
|
|
35
|
-
relativeSpecifier = `./${relativeSpecifier}`;
|
|
36
|
-
}
|
|
37
|
-
return `${quote}${relativeSpecifier}${quote}`;
|
|
38
|
-
});
|
|
39
|
-
return rewritten;
|
|
40
|
-
}
|
|
41
|
-
async function compileModule(filePath, sourceRoot, outputRoot) {
|
|
42
|
-
const relativePath = relative(sourceRoot, filePath);
|
|
43
|
-
const outputFile = resolve(outputRoot, relativePath.replace(/\.(mjs|ts)$/u, '.js'));
|
|
44
|
-
ensureDir(outputFile);
|
|
45
|
-
await build({
|
|
46
|
-
entryPoints: [filePath],
|
|
47
|
-
outfile: outputFile,
|
|
48
|
-
platform: 'node',
|
|
49
|
-
format: 'esm',
|
|
50
|
-
bundle: false,
|
|
51
|
-
logLevel: 'silent',
|
|
52
|
-
});
|
|
53
|
-
const builtSource = readFileSync(outputFile, 'utf8');
|
|
54
|
-
writeFileSync(outputFile, rewriteRuntimeSpecifiers(builtSource, outputFile), 'utf8');
|
|
55
|
-
}
|
|
56
|
-
function copyAsset(filePath, sourceRoot, outputRoot) {
|
|
57
|
-
const outputFile = resolve(outputRoot, relative(sourceRoot, filePath));
|
|
58
|
-
ensureDir(outputFile);
|
|
59
|
-
copyFileSync(filePath, outputFile);
|
|
60
|
-
if (outputFile.endsWith('.d.js')) {
|
|
61
|
-
writeFileSync(outputFile, rewriteRuntimeSpecifiers(readFileSync(outputFile, 'utf8')), 'utf8');
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
function transpileScript(filePath) {
|
|
65
|
-
const source = readFileSync(filePath, 'utf8');
|
|
66
|
-
const relativePath = relative(scriptsRoot, filePath);
|
|
67
|
-
const outputFile = resolve(distRoot, 'scripts', relativePath.replace(/\.(mjs|ts)$/u, '.js'));
|
|
68
|
-
const transformed = extname(filePath) === '.ts'
|
|
69
|
-
? ts.transpileModule(source, {
|
|
70
|
-
compilerOptions: { module: ts.ModuleKind.ESNext, target: ts.ScriptTarget.ES2022 },
|
|
71
|
-
}).outputText
|
|
72
|
-
: source;
|
|
73
|
-
ensureDir(outputFile);
|
|
74
|
-
writeFileSync(outputFile, rewriteRuntimeSpecifiers(transformed, outputFile), 'utf8');
|
|
75
|
-
chmodSync(outputFile, 0o755);
|
|
76
|
-
}
|
|
77
|
-
function emitDeclarations() {
|
|
78
|
-
const configPath = ts.findConfigFile(packageRoot, ts.sys.fileExists, 'tsconfig.json');
|
|
79
|
-
if (!configPath)
|
|
80
|
-
throw new Error('Unable to locate tsconfig.json for declaration build.');
|
|
81
|
-
const configFile = ts.readConfigFile(configPath, ts.sys.readFile);
|
|
82
|
-
const parsed = ts.parseJsonConfigFileContent(configFile.config, ts.sys, packageRoot);
|
|
83
|
-
const program = ts.createProgram({
|
|
84
|
-
rootNames: parsed.fileNames,
|
|
85
|
-
options: { ...parsed.options, declaration: true, emitDeclarationOnly: true, declarationDir: distRoot, noEmit: false },
|
|
86
|
-
});
|
|
87
|
-
const result = program.emit();
|
|
88
|
-
if (result.emitSkipped) {
|
|
89
|
-
throw new Error('Declaration build failed.');
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
rmSync(distRoot, { recursive: true, force: true });
|
|
93
|
-
for (const filePath of walkFiles(srcRoot)) {
|
|
94
|
-
const extension = extname(filePath);
|
|
95
|
-
if (extension === '.ts')
|
|
96
|
-
await compileModule(filePath, srcRoot, distRoot);
|
|
97
|
-
else if (COPY_EXTENSIONS.has(extension))
|
|
98
|
-
copyAsset(filePath, srcRoot, distRoot);
|
|
99
|
-
}
|
|
100
|
-
for (const filePath of walkFiles(scriptsRoot)) {
|
|
101
|
-
const extension = extname(filePath);
|
|
102
|
-
if (extension === '.ts' || extension === '.ts')
|
|
103
|
-
transpileScript(filePath);
|
|
104
|
-
}
|
|
105
|
-
emitDeclarations();
|
|
106
|
-
if (existsSync(resolve(packageRoot, 'README.md'))) {
|
|
107
|
-
copyFileSync(resolve(packageRoot, 'README.md'), resolve(distRoot, '..', 'README.md'));
|
|
108
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
2
|
-
import { dirname, resolve } from 'node:path';
|
|
3
|
-
import { build } from 'esbuild';
|
|
4
|
-
import { loadTreeseedDeployConfig } from '@treeseed/core/deploy/config';
|
|
5
|
-
import { loadTreeseedManifest } from '@treeseed/core/tenant-config';
|
|
6
|
-
import { parseSiteConfig } from '@treeseed/core/utils/site-config-schema';
|
|
7
|
-
import { corePackageRoot } from './package-tools.js';
|
|
8
|
-
const tenantRoot = process.cwd();
|
|
9
|
-
const workerEntry = resolve(corePackageRoot, 'dist/worker/forms-worker.js');
|
|
10
|
-
const outFile = resolve(tenantRoot, '.treeseed/generated/worker/index.js');
|
|
11
|
-
function ensureDir(filePath) {
|
|
12
|
-
mkdirSync(dirname(filePath), { recursive: true });
|
|
13
|
-
}
|
|
14
|
-
function loadSiteConfig(tenantConfig) {
|
|
15
|
-
const siteConfigPath = resolve(tenantRoot, tenantConfig.siteConfigPath);
|
|
16
|
-
return parseSiteConfig(readFileSync(siteConfigPath, 'utf8'));
|
|
17
|
-
}
|
|
18
|
-
const tenantConfig = loadTreeseedManifest();
|
|
19
|
-
const siteConfig = loadSiteConfig(tenantConfig);
|
|
20
|
-
const deployConfig = loadTreeseedDeployConfig();
|
|
21
|
-
ensureDir(outFile);
|
|
22
|
-
await build({
|
|
23
|
-
entryPoints: [workerEntry],
|
|
24
|
-
outfile: outFile,
|
|
25
|
-
bundle: true,
|
|
26
|
-
format: 'esm',
|
|
27
|
-
platform: 'browser',
|
|
28
|
-
target: 'es2022',
|
|
29
|
-
logLevel: 'silent',
|
|
30
|
-
external: ['cloudflare:sockets'],
|
|
31
|
-
define: {
|
|
32
|
-
__TREESEED_SITE_CONFIG__: JSON.stringify(siteConfig),
|
|
33
|
-
__TREESEED_DEPLOY_CONFIG__: JSON.stringify(deployConfig),
|
|
34
|
-
},
|
|
35
|
-
});
|
|
36
|
-
writeFileSync(resolve(tenantRoot, '.treeseed/generated/worker/package.json'), '{\n "type": "module"\n}\n', 'utf8');
|
|
@@ -1,373 +0,0 @@
|
|
|
1
|
-
import fsSync from 'node:fs';
|
|
2
|
-
import fs from 'node:fs/promises';
|
|
3
|
-
import path from 'node:path';
|
|
4
|
-
import process from 'node:process';
|
|
5
|
-
import { fileURLToPath } from 'node:url';
|
|
6
|
-
import { unified } from 'unified';
|
|
7
|
-
import remarkFrontmatter from 'remark-frontmatter';
|
|
8
|
-
import remarkGfm from 'remark-gfm';
|
|
9
|
-
import remarkMath from 'remark-math';
|
|
10
|
-
import remarkMdx from 'remark-mdx';
|
|
11
|
-
import remarkParse from 'remark-parse';
|
|
12
|
-
import remarkStringify from 'remark-stringify';
|
|
13
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
14
|
-
const DEFAULT_TARGETS = ['src/content/knowledge', 'src/content/pages', 'src/content/notes'];
|
|
15
|
-
const MARKDOWN_EXTENSIONS = new Set(['.md', '.mdx']);
|
|
16
|
-
export async function normalizeMarkdown(source, options = {}) {
|
|
17
|
-
const normalizedSource = source.replace(/\r\n?/g, '\n');
|
|
18
|
-
const { frontmatter, body } = splitFrontmatter(normalizedSource);
|
|
19
|
-
const preprocessed = preprocessMarkdownBody(body);
|
|
20
|
-
const isMdxFile = (options.filePath ?? '').toLowerCase().endsWith('.mdx');
|
|
21
|
-
const processor = unified().use(remarkParse).use(remarkFrontmatter, ['yaml']).use(remarkGfm).use(remarkMath);
|
|
22
|
-
if (isMdxFile) {
|
|
23
|
-
processor.use(remarkMdx);
|
|
24
|
-
}
|
|
25
|
-
processor.use(remarkStringify, {
|
|
26
|
-
bullet: '-',
|
|
27
|
-
closeAtx: false,
|
|
28
|
-
fences: true,
|
|
29
|
-
incrementListMarker: true,
|
|
30
|
-
listItemIndent: 'one',
|
|
31
|
-
resourceLink: true,
|
|
32
|
-
rule: '*',
|
|
33
|
-
ruleRepetition: 3,
|
|
34
|
-
ruleSpaces: false,
|
|
35
|
-
setext: false,
|
|
36
|
-
tightDefinitions: true,
|
|
37
|
-
});
|
|
38
|
-
const rendered = postprocessMarkdown(String(await processor.process({ path: options.filePath ?? 'document.md', value: preprocessed }))).trimEnd();
|
|
39
|
-
const segments = [];
|
|
40
|
-
if (frontmatter) {
|
|
41
|
-
segments.push(frontmatter.trimEnd());
|
|
42
|
-
}
|
|
43
|
-
if (rendered) {
|
|
44
|
-
segments.push(rendered);
|
|
45
|
-
}
|
|
46
|
-
return `${segments.join('\n\n')}\n`;
|
|
47
|
-
}
|
|
48
|
-
export async function collectMarkdownTargets(inputPaths, cwd = process.cwd()) {
|
|
49
|
-
const requested = inputPaths.length > 0 ? inputPaths : DEFAULT_TARGETS;
|
|
50
|
-
const resolved = requested.map((target) => resolveTargetPath(target, cwd));
|
|
51
|
-
const files = [];
|
|
52
|
-
for (const target of resolved) {
|
|
53
|
-
const stats = await safeStat(target);
|
|
54
|
-
if (!stats) {
|
|
55
|
-
continue;
|
|
56
|
-
}
|
|
57
|
-
if (stats.isFile()) {
|
|
58
|
-
if (isMarkdownFile(target)) {
|
|
59
|
-
files.push(target);
|
|
60
|
-
}
|
|
61
|
-
continue;
|
|
62
|
-
}
|
|
63
|
-
files.push(...(await collectMarkdownFiles(target)));
|
|
64
|
-
}
|
|
65
|
-
return [...new Set(files)].sort((left, right) => left.localeCompare(right, undefined, { numeric: true, sensitivity: 'base' }));
|
|
66
|
-
}
|
|
67
|
-
async function collectMarkdownFiles(rootPath) {
|
|
68
|
-
const entries = await fs.readdir(rootPath, { withFileTypes: true });
|
|
69
|
-
const files = [];
|
|
70
|
-
for (const entry of entries) {
|
|
71
|
-
const fullPath = path.join(rootPath, entry.name);
|
|
72
|
-
if (entry.isDirectory()) {
|
|
73
|
-
files.push(...(await collectMarkdownFiles(fullPath)));
|
|
74
|
-
continue;
|
|
75
|
-
}
|
|
76
|
-
if (entry.isFile() && isMarkdownFile(fullPath)) {
|
|
77
|
-
files.push(fullPath);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
return files;
|
|
81
|
-
}
|
|
82
|
-
function isMarkdownFile(filePath) {
|
|
83
|
-
return MARKDOWN_EXTENSIONS.has(path.extname(filePath).toLowerCase());
|
|
84
|
-
}
|
|
85
|
-
async function safeStat(targetPath) {
|
|
86
|
-
try {
|
|
87
|
-
return await fs.stat(targetPath);
|
|
88
|
-
}
|
|
89
|
-
catch {
|
|
90
|
-
return null;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
function resolveTargetPath(target, cwd) {
|
|
94
|
-
const directPath = path.resolve(cwd, target);
|
|
95
|
-
if (path.isAbsolute(target)) {
|
|
96
|
-
return target;
|
|
97
|
-
}
|
|
98
|
-
if (fsSyncExists(directPath)) {
|
|
99
|
-
return directPath;
|
|
100
|
-
}
|
|
101
|
-
if (path.basename(cwd) === 'docs' && target.startsWith('docs/')) {
|
|
102
|
-
return path.resolve(cwd, target.slice('docs/'.length));
|
|
103
|
-
}
|
|
104
|
-
return directPath;
|
|
105
|
-
}
|
|
106
|
-
function fsSyncExists(targetPath) {
|
|
107
|
-
try {
|
|
108
|
-
return fsSync.existsSync(targetPath);
|
|
109
|
-
}
|
|
110
|
-
catch {
|
|
111
|
-
return false;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
function splitFrontmatter(source) {
|
|
115
|
-
if (!source.startsWith('---\n')) {
|
|
116
|
-
return { frontmatter: '', body: source };
|
|
117
|
-
}
|
|
118
|
-
const closingIndex = source.indexOf('\n---\n', 4);
|
|
119
|
-
if (closingIndex === -1) {
|
|
120
|
-
return { frontmatter: '', body: source };
|
|
121
|
-
}
|
|
122
|
-
const frontmatter = source.slice(0, closingIndex + 5);
|
|
123
|
-
const body = source.slice(closingIndex + 5);
|
|
124
|
-
return { frontmatter, body };
|
|
125
|
-
}
|
|
126
|
-
function preprocessMarkdownBody(body) {
|
|
127
|
-
const lines = body.split('\n');
|
|
128
|
-
const output = [];
|
|
129
|
-
let inFence = false;
|
|
130
|
-
let fenceMarker = '';
|
|
131
|
-
let fenceLength = 0;
|
|
132
|
-
let previousNonBlankType = 'start';
|
|
133
|
-
for (const originalLine of lines) {
|
|
134
|
-
const line = originalLine.trimEnd();
|
|
135
|
-
const trimmed = line.trim();
|
|
136
|
-
if (inFence) {
|
|
137
|
-
pushLine(output, line);
|
|
138
|
-
if (isFenceClose(line, fenceMarker, fenceLength)) {
|
|
139
|
-
inFence = false;
|
|
140
|
-
previousNonBlankType = 'fence';
|
|
141
|
-
}
|
|
142
|
-
continue;
|
|
143
|
-
}
|
|
144
|
-
if (trimmed === '') {
|
|
145
|
-
pushBlankLine(output);
|
|
146
|
-
continue;
|
|
147
|
-
}
|
|
148
|
-
if (isFenceOpen(line)) {
|
|
149
|
-
if (needsBlankLineBefore(previousNonBlankType)) {
|
|
150
|
-
pushBlankLine(output);
|
|
151
|
-
}
|
|
152
|
-
pushLine(output, line);
|
|
153
|
-
({ marker: fenceMarker, length: fenceLength } = getFenceInfo(line));
|
|
154
|
-
inFence = true;
|
|
155
|
-
previousNonBlankType = 'fence';
|
|
156
|
-
continue;
|
|
157
|
-
}
|
|
158
|
-
const lineType = classifyLine(line);
|
|
159
|
-
const previousLine = output.length > 0 ? findPreviousNonBlankLine(output) : '';
|
|
160
|
-
if (requiresBlankLineBetween(previousNonBlankType, lineType, previousLine, line)) {
|
|
161
|
-
pushBlankLine(output);
|
|
162
|
-
}
|
|
163
|
-
pushLine(output, line);
|
|
164
|
-
previousNonBlankType = lineType;
|
|
165
|
-
}
|
|
166
|
-
return collapseBlankLines(output).join('\n').trim();
|
|
167
|
-
}
|
|
168
|
-
function classifyLine(line) {
|
|
169
|
-
if (isTableLine(line))
|
|
170
|
-
return 'table';
|
|
171
|
-
if (/^\s{0,3}#{1,6}\s+\S/.test(line))
|
|
172
|
-
return 'heading';
|
|
173
|
-
if (/^\s{0,3}(?:[-*_])(?:\s*\1){2,}\s*$/.test(line))
|
|
174
|
-
return 'rule';
|
|
175
|
-
if (/^\s{0,3}>\s?/.test(line))
|
|
176
|
-
return 'blockquote';
|
|
177
|
-
if (/^\s{0,3}(?:[-+*]|\d+[.)])\s+/.test(line))
|
|
178
|
-
return 'list';
|
|
179
|
-
if (/^\s*<(?:[A-Za-z][^>]*)>\s*$/.test(line))
|
|
180
|
-
return 'html';
|
|
181
|
-
if (/^\s*(?:import|export)\s.+$/.test(line))
|
|
182
|
-
return 'mdx';
|
|
183
|
-
if (/^\s*<\/?[A-Z][^>]*>\s*$/.test(line))
|
|
184
|
-
return 'mdx';
|
|
185
|
-
return 'prose';
|
|
186
|
-
}
|
|
187
|
-
function isTableLine(line) {
|
|
188
|
-
const trimmed = line.trim();
|
|
189
|
-
return /^\|.*\|\s*$/.test(trimmed) || /^[:\-|\s]+$/.test(trimmed);
|
|
190
|
-
}
|
|
191
|
-
function isFenceOpen(line) {
|
|
192
|
-
return /^\s{0,3}(```+|~~~+)/.test(line);
|
|
193
|
-
}
|
|
194
|
-
function getFenceInfo(line) {
|
|
195
|
-
const match = line.match(/^\s{0,3}(```+|~~~+)/);
|
|
196
|
-
return {
|
|
197
|
-
length: match?.[1]?.length ?? 3,
|
|
198
|
-
marker: match?.[1]?.[0] ?? '`',
|
|
199
|
-
};
|
|
200
|
-
}
|
|
201
|
-
function isFenceClose(line, marker, requiredLength) {
|
|
202
|
-
return new RegExp(`^\\s{0,3}${escapeRegExp(marker)}{${requiredLength},}\\s*$`).test(line);
|
|
203
|
-
}
|
|
204
|
-
function escapeRegExp(value) {
|
|
205
|
-
return value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
206
|
-
}
|
|
207
|
-
function needsBlankLineBefore(previousType) {
|
|
208
|
-
return !['start', 'blank'].includes(previousType);
|
|
209
|
-
}
|
|
210
|
-
function requiresBlankLineBetween(previousType, currentType, previousLine, currentLine) {
|
|
211
|
-
if (previousType === 'start')
|
|
212
|
-
return false;
|
|
213
|
-
if (previousType === 'table' && currentType === 'table')
|
|
214
|
-
return false;
|
|
215
|
-
if (previousType === 'blockquote' && currentType === 'blockquote')
|
|
216
|
-
return false;
|
|
217
|
-
if (previousType === 'mdx' && currentType === 'mdx')
|
|
218
|
-
return false;
|
|
219
|
-
if (previousType === 'html' && currentType === 'prose' && /^\s*<a\b/i.test(currentLine))
|
|
220
|
-
return false;
|
|
221
|
-
if (previousType === 'prose' && currentType === 'prose' && looksLikeParagraphBoundary(previousLine, currentLine))
|
|
222
|
-
return true;
|
|
223
|
-
if (currentType === 'heading' || currentType === 'rule' || currentType === 'blockquote')
|
|
224
|
-
return true;
|
|
225
|
-
if (previousType === 'heading')
|
|
226
|
-
return true;
|
|
227
|
-
if (previousType === 'rule')
|
|
228
|
-
return true;
|
|
229
|
-
if (previousType === 'table' && currentType !== 'table')
|
|
230
|
-
return true;
|
|
231
|
-
if (previousType === 'list' && currentType === 'prose')
|
|
232
|
-
return true;
|
|
233
|
-
if (previousType === 'list' && ['heading', 'rule', 'table', 'html', 'mdx'].includes(currentType))
|
|
234
|
-
return true;
|
|
235
|
-
if (previousType === 'prose' && ['list', 'table', 'html', 'mdx'].includes(currentType))
|
|
236
|
-
return true;
|
|
237
|
-
if (['html', 'mdx'].includes(previousType) && currentType === 'prose')
|
|
238
|
-
return true;
|
|
239
|
-
return false;
|
|
240
|
-
}
|
|
241
|
-
function findPreviousNonBlankLine(lines) {
|
|
242
|
-
for (let index = lines.length - 1; index >= 0; index -= 1) {
|
|
243
|
-
if (lines[index].trim() !== '') {
|
|
244
|
-
return lines[index];
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
return '';
|
|
248
|
-
}
|
|
249
|
-
function pushLine(output, line) {
|
|
250
|
-
output.push(line);
|
|
251
|
-
}
|
|
252
|
-
function pushBlankLine(output) {
|
|
253
|
-
if (output.length === 0)
|
|
254
|
-
return;
|
|
255
|
-
if (output.at(-1) === '')
|
|
256
|
-
return;
|
|
257
|
-
output.push('');
|
|
258
|
-
}
|
|
259
|
-
function collapseBlankLines(lines) {
|
|
260
|
-
const collapsed = [];
|
|
261
|
-
for (const line of lines) {
|
|
262
|
-
if (line === '' && collapsed.at(-1) === '') {
|
|
263
|
-
continue;
|
|
264
|
-
}
|
|
265
|
-
collapsed.push(line);
|
|
266
|
-
}
|
|
267
|
-
return collapsed;
|
|
268
|
-
}
|
|
269
|
-
function postprocessMarkdown(content) {
|
|
270
|
-
return content
|
|
271
|
-
.replace(/\[\\\[(\d+)\\\]\]\(#ref-\1\)/g, '[[$1]](#ref-$1)')
|
|
272
|
-
.replace(/<a([^>]*?)\s*\/>/g, '<a$1></a>');
|
|
273
|
-
}
|
|
274
|
-
function looksLikeParagraphBoundary(previousLine, currentLine) {
|
|
275
|
-
const previous = previousLine.trim();
|
|
276
|
-
const current = currentLine.trim();
|
|
277
|
-
if (!previous || !current) {
|
|
278
|
-
return false;
|
|
279
|
-
}
|
|
280
|
-
if (/^\*\*\d+\./.test(current) || /^\*[^*]+:\*/.test(current)) {
|
|
281
|
-
return true;
|
|
282
|
-
}
|
|
283
|
-
if (/^\*\*.*\*\*$/.test(previous) && /^\*[^*]+:\*/.test(current)) {
|
|
284
|
-
return true;
|
|
285
|
-
}
|
|
286
|
-
return endsLikeStandaloneParagraph(previous) && startsLikeStandaloneParagraph(current);
|
|
287
|
-
}
|
|
288
|
-
function endsLikeStandaloneParagraph(line) {
|
|
289
|
-
return /(?:[.!?]["')\]]*|\*{1,2}|\d)\s*$/.test(line);
|
|
290
|
-
}
|
|
291
|
-
function startsLikeStandaloneParagraph(line) {
|
|
292
|
-
return /^(?:[A-Z0-9]|\*\*|\*[^*]+:\*|\[|["'(])/.test(line);
|
|
293
|
-
}
|
|
294
|
-
function parseArgs(argv) {
|
|
295
|
-
const args = { check: false, write: false, targets: [] };
|
|
296
|
-
for (const arg of argv) {
|
|
297
|
-
if (arg === '--check') {
|
|
298
|
-
args.check = true;
|
|
299
|
-
continue;
|
|
300
|
-
}
|
|
301
|
-
if (arg === '--write') {
|
|
302
|
-
args.write = true;
|
|
303
|
-
continue;
|
|
304
|
-
}
|
|
305
|
-
if (arg === '--help' || arg === '-h') {
|
|
306
|
-
args.help = true;
|
|
307
|
-
continue;
|
|
308
|
-
}
|
|
309
|
-
args.targets.push(arg);
|
|
310
|
-
}
|
|
311
|
-
if (!args.check && !args.write) {
|
|
312
|
-
args.write = true;
|
|
313
|
-
}
|
|
314
|
-
return args;
|
|
315
|
-
}
|
|
316
|
-
function printHelp() {
|
|
317
|
-
console.log(`Usage: node scripts/cleanup-markdown.mjs [--check|--write] [paths...]
|
|
318
|
-
|
|
319
|
-
Normalizes Markdown/MDX files for public docs readability.
|
|
320
|
-
|
|
321
|
-
Examples:
|
|
322
|
-
npm run cleanup:markdown --workspace docs -- src/content/knowledge/research
|
|
323
|
-
npm run cleanup:markdown:check --workspace docs -- src/content/pages/status.mdx
|
|
324
|
-
`);
|
|
325
|
-
}
|
|
326
|
-
async function runCli(argv = process.argv.slice(2)) {
|
|
327
|
-
const args = parseArgs(argv);
|
|
328
|
-
if (args.help) {
|
|
329
|
-
printHelp();
|
|
330
|
-
return 0;
|
|
331
|
-
}
|
|
332
|
-
if (args.check && args.write) {
|
|
333
|
-
console.error('Choose either --check or --write, not both.');
|
|
334
|
-
return 1;
|
|
335
|
-
}
|
|
336
|
-
const mode = args.check ? 'check' : 'write';
|
|
337
|
-
const targets = await collectMarkdownTargets(args.targets);
|
|
338
|
-
if (targets.length === 0) {
|
|
339
|
-
console.error('No Markdown files found for cleanup.');
|
|
340
|
-
return 1;
|
|
341
|
-
}
|
|
342
|
-
const changedFiles = [];
|
|
343
|
-
for (const filePath of targets) {
|
|
344
|
-
const original = await fs.readFile(filePath, 'utf8');
|
|
345
|
-
const normalized = await normalizeMarkdown(original, { filePath });
|
|
346
|
-
if (normalized === original) {
|
|
347
|
-
continue;
|
|
348
|
-
}
|
|
349
|
-
changedFiles.push(filePath);
|
|
350
|
-
if (mode === 'write') {
|
|
351
|
-
await fs.writeFile(filePath, normalized, 'utf8');
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
if (mode === 'check') {
|
|
355
|
-
if (changedFiles.length > 0) {
|
|
356
|
-
console.error('Markdown cleanup needed in:');
|
|
357
|
-
for (const filePath of changedFiles) {
|
|
358
|
-
console.error(`- ${path.relative(process.cwd(), filePath)}`);
|
|
359
|
-
}
|
|
360
|
-
return 1;
|
|
361
|
-
}
|
|
362
|
-
console.log(`Markdown cleanup check passed for ${targets.length} file(s).`);
|
|
363
|
-
return 0;
|
|
364
|
-
}
|
|
365
|
-
console.log(changedFiles.length > 0
|
|
366
|
-
? `Normalized ${changedFiles.length} Markdown file(s).`
|
|
367
|
-
: `No Markdown changes needed across ${targets.length} file(s).`);
|
|
368
|
-
return 0;
|
|
369
|
-
}
|
|
370
|
-
if (process.argv[1] === __filename) {
|
|
371
|
-
const exitCode = await runCli();
|
|
372
|
-
process.exit(exitCode);
|
|
373
|
-
}
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
export declare function getTreeseedMachineConfigPaths(tenantRoot: any): {
|
|
2
|
-
configPath: string;
|
|
3
|
-
keyPath: string;
|
|
4
|
-
};
|
|
5
|
-
export declare function createDefaultTreeseedMachineConfig({ tenantRoot, deployConfig, tenantConfig }: {
|
|
6
|
-
tenantRoot: any;
|
|
7
|
-
deployConfig: any;
|
|
8
|
-
tenantConfig: any;
|
|
9
|
-
}): {
|
|
10
|
-
version: number;
|
|
11
|
-
project: {
|
|
12
|
-
tenantRoot: any;
|
|
13
|
-
tenantId: any;
|
|
14
|
-
slug: any;
|
|
15
|
-
name: any;
|
|
16
|
-
siteUrl: any;
|
|
17
|
-
overlayPath: string;
|
|
18
|
-
};
|
|
19
|
-
settings: {
|
|
20
|
-
sync: {
|
|
21
|
-
github: boolean;
|
|
22
|
-
cloudflare: boolean;
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
environments: {
|
|
26
|
-
[k: string]: {
|
|
27
|
-
values: {};
|
|
28
|
-
secrets: {};
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
export declare function loadTreeseedMachineConfig(tenantRoot: any): any;
|
|
33
|
-
export declare function writeTreeseedMachineConfig(tenantRoot: any, config: any): void;
|
|
34
|
-
export declare function ensureTreeseedGitignoreEntries(tenantRoot: any): string;
|
|
35
|
-
export declare function resolveTreeseedMachineEnvironmentValues(tenantRoot: any, scope: any): any;
|
|
36
|
-
export declare function setTreeseedMachineEnvironmentValue(tenantRoot: any, scope: any, entry: any, value: any): any;
|
|
37
|
-
export declare function collectTreeseedEnvironmentContext(tenantRoot: any): import("@treeseed/core/environment").TreeseedResolvedEnvironmentRegistry;
|
|
38
|
-
export declare function collectTreeseedConfigSeedValues(tenantRoot: any, scope: any): any;
|
|
39
|
-
export declare function applyTreeseedEnvironmentToProcess({ tenantRoot, scope }: {
|
|
40
|
-
tenantRoot: any;
|
|
41
|
-
scope: any;
|
|
42
|
-
}): any;
|
|
43
|
-
export declare function validateTreeseedCommandEnvironment({ tenantRoot, scope, purpose }: {
|
|
44
|
-
tenantRoot: any;
|
|
45
|
-
scope: any;
|
|
46
|
-
purpose: any;
|
|
47
|
-
}): {
|
|
48
|
-
registry: import("@treeseed/core/environment").TreeseedResolvedEnvironmentRegistry;
|
|
49
|
-
values: any;
|
|
50
|
-
validation: import("@treeseed/core/environment").TreeseedEnvironmentValidationResult;
|
|
51
|
-
};
|
|
52
|
-
export declare function assertTreeseedCommandEnvironment({ tenantRoot, scope, purpose }: {
|
|
53
|
-
tenantRoot: any;
|
|
54
|
-
scope: any;
|
|
55
|
-
purpose: any;
|
|
56
|
-
}): {
|
|
57
|
-
registry: import("@treeseed/core/environment").TreeseedResolvedEnvironmentRegistry;
|
|
58
|
-
values: any;
|
|
59
|
-
validation: import("@treeseed/core/environment").TreeseedEnvironmentValidationResult;
|
|
60
|
-
};
|
|
61
|
-
export declare function writeTreeseedLocalEnvironmentFiles(tenantRoot: any): {
|
|
62
|
-
envLocalPath: string;
|
|
63
|
-
devVarsPath: string;
|
|
64
|
-
};
|
|
65
|
-
export declare function syncTreeseedGitHubEnvironment({ tenantRoot, scope, dryRun }?: {
|
|
66
|
-
scope?: string | undefined;
|
|
67
|
-
dryRun?: boolean | undefined;
|
|
68
|
-
}): {
|
|
69
|
-
secrets: never[];
|
|
70
|
-
variables: never[];
|
|
71
|
-
repository: string;
|
|
72
|
-
scope: string;
|
|
73
|
-
};
|
|
74
|
-
export declare function syncTreeseedCloudflareEnvironment({ tenantRoot, scope, dryRun }?: {
|
|
75
|
-
scope?: string | undefined;
|
|
76
|
-
dryRun?: boolean | undefined;
|
|
77
|
-
}): {
|
|
78
|
-
scope: string;
|
|
79
|
-
target: {
|
|
80
|
-
kind: string;
|
|
81
|
-
scope: string;
|
|
82
|
-
};
|
|
83
|
-
wranglerPath: string;
|
|
84
|
-
secrets: string[];
|
|
85
|
-
varsManagedByWranglerConfig: string[];
|
|
86
|
-
};
|
|
87
|
-
export declare function initializeTreeseedPersistentEnvironment({ tenantRoot, scope, dryRun }?: {
|
|
88
|
-
scope?: string | undefined;
|
|
89
|
-
dryRun?: boolean | undefined;
|
|
90
|
-
}): {
|
|
91
|
-
scope: string;
|
|
92
|
-
target: {
|
|
93
|
-
kind: string;
|
|
94
|
-
scope: string;
|
|
95
|
-
};
|
|
96
|
-
summary: {
|
|
97
|
-
target: any;
|
|
98
|
-
workerName: any;
|
|
99
|
-
siteUrl: any;
|
|
100
|
-
accountId: any;
|
|
101
|
-
formGuardKv: any;
|
|
102
|
-
sessionKv: any;
|
|
103
|
-
siteDataDb: any;
|
|
104
|
-
};
|
|
105
|
-
secrets: string[];
|
|
106
|
-
};
|
|
107
|
-
export declare function runTreeseedConfigWizard({ tenantRoot, scopes, sync, prompt, authStatus, write, }: {
|
|
108
|
-
tenantRoot: any;
|
|
109
|
-
scopes?: string[] | undefined;
|
|
110
|
-
sync?: string | undefined;
|
|
111
|
-
prompt: any;
|
|
112
|
-
authStatus: any;
|
|
113
|
-
write?: {
|
|
114
|
-
(...data: any[]): void;
|
|
115
|
-
(message?: any, ...optionalParams: any[]): void;
|
|
116
|
-
} | undefined;
|
|
117
|
-
}): Promise<{
|
|
118
|
-
scopes: string[];
|
|
119
|
-
updated: never[];
|
|
120
|
-
synced: {};
|
|
121
|
-
initialized: never[];
|
|
122
|
-
}>;
|