superslate 0.1.1 → 0.2.0
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/dist/cli.js +13 -24
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1141,7 +1141,7 @@ var BRAND_MANIFEST = [
|
|
|
1141
1141
|
{ path: "apps/web/src/configs/config.ts", occurrences: 2 },
|
|
1142
1142
|
{ path: "apps/web/index.html", occurrences: 4 },
|
|
1143
1143
|
{ path: "apps/web/public/favicon/site.webmanifest", occurrences: 2 },
|
|
1144
|
-
{ path: "apps/web/public/offline.html", occurrences:
|
|
1144
|
+
{ path: "apps/web/public/offline.html", occurrences: 6 },
|
|
1145
1145
|
{ path: "apps/docs/lib/shared.ts", occurrences: 1 },
|
|
1146
1146
|
{ path: "apps/server/.env.example", occurrences: 1 },
|
|
1147
1147
|
{ path: "apps/server/src/config/env.ts", occurrences: 2 },
|
|
@@ -1341,10 +1341,10 @@ function removeParagraphContaining(content, fragment) {
|
|
|
1341
1341
|
`);
|
|
1342
1342
|
}
|
|
1343
1343
|
function rewriteBuyerAgentInstructions(content) {
|
|
1344
|
-
if (content.includes("Audit and remediate the complete buyer-owned SaaS application") && !/landing\/|seller-surface|studio-owned/i.test(content)) {
|
|
1344
|
+
if (content.includes("Audit and remediate the complete buyer-owned SaaS application") && !/internal\/|landing\/|seller-surface|studio-owned/i.test(content)) {
|
|
1345
1345
|
return content;
|
|
1346
1346
|
}
|
|
1347
|
-
let rewritten = removeParagraphContaining(content, "`
|
|
1347
|
+
let rewritten = removeParagraphContaining(content, "`internal/` holds every seller-only surface");
|
|
1348
1348
|
rewritten = removeParagraphContaining(rewritten, "The root pnpm workspace includes only `apps/*` and `packages/*`.");
|
|
1349
1349
|
rewritten = replaceMarkdownSection(rewritten, "Product security audit scope", `## Product security audit scope
|
|
1350
1350
|
|
|
@@ -1357,18 +1357,18 @@ into this repository.
|
|
|
1357
1357
|
`);
|
|
1358
1358
|
rewritten = replaceMarkdownSection(rewritten, "Landing boundary", "");
|
|
1359
1359
|
rewritten = rewritten.split(`
|
|
1360
|
-
`).filter((line) => !line.includes("| `
|
|
1361
|
-
`).replace("real env files, `
|
|
1362
|
-
if (/landing\/|seller-surface|studio-owned/i.test(rewritten)) {
|
|
1360
|
+
`).filter((line) => !line.includes("| `internal`")).join(`
|
|
1361
|
+
`).replace("real env files, `internal/`, or\n `bun.lock`", "real env files, or `bun.lock`");
|
|
1362
|
+
if (/internal\/|landing\/|seller-surface|studio-owned/i.test(rewritten)) {
|
|
1363
1363
|
throw new Error("Buyer agent instructions still contain seller-only guidance.");
|
|
1364
1364
|
}
|
|
1365
1365
|
return rewritten;
|
|
1366
1366
|
}
|
|
1367
1367
|
function rewriteBuyerClaudeInstructions(content) {
|
|
1368
|
-
if (!/landing\/|studio-owned/i.test(content))
|
|
1368
|
+
if (!/internal\/|landing\/|studio-owned/i.test(content))
|
|
1369
1369
|
return content;
|
|
1370
|
-
const rewritten = removeParagraphContaining(content, "`landing/AGENTS.md`");
|
|
1371
|
-
if (/landing\/|studio-owned/i.test(rewritten)) {
|
|
1370
|
+
const rewritten = removeParagraphContaining(content, "`internal/landing/AGENTS.md`");
|
|
1371
|
+
if (/internal\/|landing\/|studio-owned/i.test(rewritten)) {
|
|
1372
1372
|
throw new Error("Buyer Claude instructions still contain seller-only guidance.");
|
|
1373
1373
|
}
|
|
1374
1374
|
return rewritten;
|
|
@@ -1424,14 +1424,12 @@ function isTemplatePathExcluded(relativePath) {
|
|
|
1424
1424
|
return true;
|
|
1425
1425
|
if (normalized === "skills-lock.json")
|
|
1426
1426
|
return true;
|
|
1427
|
-
if (normalized === "
|
|
1427
|
+
if (normalized === "internal" || normalized.startsWith("internal/"))
|
|
1428
1428
|
return true;
|
|
1429
1429
|
if (normalized === "apps/worker" || normalized.startsWith("apps/worker/"))
|
|
1430
1430
|
return true;
|
|
1431
1431
|
if (parts.includes("dist") || parts.includes("out"))
|
|
1432
1432
|
return true;
|
|
1433
|
-
if (normalized === "landing" || normalized.startsWith("landing/"))
|
|
1434
|
-
return true;
|
|
1435
1433
|
if (normalized === "bun.lock")
|
|
1436
1434
|
return true;
|
|
1437
1435
|
if (normalized === ".vercelignore")
|
|
@@ -1448,10 +1446,6 @@ function isTemplatePathExcluded(relativePath) {
|
|
|
1448
1446
|
return true;
|
|
1449
1447
|
if (normalized === "packages/create-app/README.md")
|
|
1450
1448
|
return true;
|
|
1451
|
-
if (normalized === "docs/phase2" || normalized.startsWith("docs/phase2/"))
|
|
1452
|
-
return true;
|
|
1453
|
-
if (/^docs\/evaluations\/(?:tec|pro2)-[^/]+\.md$/.test(normalized))
|
|
1454
|
-
return true;
|
|
1455
1449
|
if (normalized === "apps/server/server")
|
|
1456
1450
|
return true;
|
|
1457
1451
|
if (basename.endsWith(".tsbuildinfo"))
|
|
@@ -1601,9 +1595,6 @@ async function applyScopeRewrite(target, scope) {
|
|
|
1601
1595
|
if (result.replacements > 0 && (path.endsWith(".ts") || path.endsWith(".tsx"))) {
|
|
1602
1596
|
result.content = wrapLongNamedImports(result.content);
|
|
1603
1597
|
}
|
|
1604
|
-
if (result.replacements > 0 && path.endsWith("/apps/docs/README.md")) {
|
|
1605
|
-
result.content = result.content.replace("root workspace filter: `pnpm", "root workspace filter:\n`pnpm").replace("<command>`.\nThe product deployment", "<command>`. The product deployment").replace("not deploy this Next.js application. See `docs/docs-site.md`\nfor publication", "not deploy this\nNext.js application. See `docs/docs-site.md` for publication");
|
|
1606
|
-
}
|
|
1607
1598
|
return result;
|
|
1608
1599
|
});
|
|
1609
1600
|
if (replacements > 0)
|
|
@@ -1662,17 +1653,15 @@ async function neutralizeSourceCli(target, scope, brandName) {
|
|
|
1662
1653
|
if (cliPackage.name !== CLI_PACKAGE_NAME || !cliPackage.bin?.[CLI_NAME2]) {
|
|
1663
1654
|
throw new Error(`Source CLI package must expose ${CLI_PACKAGE_NAME} as ${CLI_NAME2}.`);
|
|
1664
1655
|
}
|
|
1665
|
-
|
|
1666
|
-
cliPackage.name = BUYER_CLI_PACKAGE_NAME;
|
|
1667
|
-
cliPackage.private = true;
|
|
1668
|
-
cliPackage.bin = { [BUYER_CLI_NAME]: executable };
|
|
1656
|
+
cliPackage.bin = { [BUYER_CLI_NAME]: "./src/cli.ts" };
|
|
1669
1657
|
delete cliPackage.description;
|
|
1670
1658
|
delete cliPackage.homepage;
|
|
1671
1659
|
delete cliPackage.repository;
|
|
1672
1660
|
delete cliPackage.keywords;
|
|
1673
1661
|
delete cliPackage.files;
|
|
1674
1662
|
delete cliPackage.publishConfig;
|
|
1675
|
-
|
|
1663
|
+
const { name: _sourceName, version: cliVersion, ...cliPackageRemainder } = cliPackage;
|
|
1664
|
+
await writeFile4(cliPackagePath, `${JSON.stringify({ name: BUYER_CLI_PACKAGE_NAME, version: cliVersion, private: true, ...cliPackageRemainder }, null, 2)}
|
|
1676
1665
|
`);
|
|
1677
1666
|
const constantsPath = join6(target, "packages/create-app/src/constants.ts");
|
|
1678
1667
|
const constants3 = await readFile5(constantsPath, "utf8");
|