Skip to content

Commit 12b3941

Browse files
vctrchuclaude
andcommitted
fix: resolve shopify-dev from World monorepo for doc generation
The standalone shopify-dev repo is deprecated — shopify-dev now lives in World at //areas/platforms/shopify-dev. Remove the legacy fallback and interactive prompt. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 87dfb6f commit 12b3941

2 files changed

Lines changed: 11 additions & 22 deletions

File tree

packages/ui-extensions/docs/surfaces/build-doc-shared.mjs

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,22 @@ import childProcess from 'child_process';
33
import fs from 'fs/promises';
44
import {existsSync} from 'fs';
55
import path from 'path';
6-
import readline from 'readline/promises';
7-
import process, {stdin as input, stdout as output} from 'process';
6+
import process from 'process';
87

9-
export const resolveShopifyDevPath = async (rootPath) => {
10-
const defaultPath = path.resolve(rootPath, '../../../shopify-dev');
11-
if (existsSync(defaultPath)) return defaultPath;
12-
13-
const rl = readline.createInterface({input, output});
14-
const answer = (
15-
await rl.question(
16-
`\n\x1b[33m⚠️ Shopify dev directory not found at:\x1b[0m \x1b[1m${defaultPath}\x1b[0m\n\x1b[32mPlease provide the absolute path to your "shopify-dev" repo:\x1b[0m `,
17-
)
18-
).trim();
19-
rl.close();
8+
export const resolveShopifyDevPath = async () => {
9+
const worldPath = path.join(
10+
process.env.HOME,
11+
'world/trees/root/src/areas/platforms/shopify-dev',
12+
);
2013

21-
const shopifyDevPath = answer ? path.resolve(answer) : '';
22-
if (!shopifyDevPath || !existsSync(shopifyDevPath)) {
14+
if (!existsSync(worldPath)) {
2315
throw new Error(
24-
`\x1b[31m❌ Error: ${
25-
shopifyDevPath
26-
? `shopify-dev directory not found at ${shopifyDevPath}.`
27-
: 'Path cannot be empty.'
28-
} Check the path and try again!\x1b[0m`,
16+
`\x1b[31m❌ Error: shopify-dev not found at ${worldPath}.\n` +
17+
`Run: tec checkout add //areas/platforms/shopify-dev\x1b[0m`,
2918
);
3019
}
3120

32-
return shopifyDevPath;
21+
return worldPath;
3322
};
3423

3524
export const replaceFileContent = async ({

packages/ui-extensions/docs/surfaces/point-of-sale/build-docs.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const srcRelativePath = 'src/surfaces/point-of-sale';
3131
const docsPath = path.join(rootPath, docsRelativePath);
3232
const srcPath = path.join(rootPath, srcRelativePath);
3333
const generatedDocsPath = path.join(docsPath, 'generated');
34-
const shopifyDevPath = await resolveShopifyDevPath(rootPath);
34+
const shopifyDevPath = await resolveShopifyDevPath();
3535
const shopifyDevDBPath = path.join(
3636
shopifyDevPath,
3737
'areas/platforms/shopify-dev/db/data/docs/templated_apis',

0 commit comments

Comments
 (0)