@starlein/paperclip-plugin-company-wizard 0.3.15 → 0.3.19
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/LICENSE +5 -1
- package/README.md +18 -7
- package/dist/manifest.js +2 -2
- package/dist/manifest.js.map +1 -1
- package/dist/ui/index.css +1 -1
- package/dist/ui/index.css.map +2 -2
- package/dist/ui/index.js +11 -3
- package/dist/ui/index.js.map +2 -2
- package/dist/worker.js +27 -4
- package/dist/worker.js.map +2 -2
- package/package.json +5 -2
- package/templates/ai-wizard/interview-system.md +1 -1
- package/templates/ai-wizard/single-shot-system.md +1 -1
- package/templates/modules/architecture-plan/docs/architecture-template.md +1 -1
- package/templates/modules/architecture-plan/docs/design-system-template.md +1 -1
- package/templates/modules/brand-identity/docs/brand-identity-template.md +1 -1
- package/templates/modules/github-repo/README.md +1 -1
- package/templates/modules/github-repo/module.meta.json +2 -2
- package/templates/modules/market-analysis/docs/market-analysis-template.md +1 -1
- package/templates/modules/tech-stack/docs/tech-stack-template.md +1 -1
- package/templates/modules/user-testing/docs/user-testing-template.md +1 -1
- package/templates/modules/vision-workshop/docs/vision-template.md +1 -1
package/dist/worker.js
CHANGED
|
@@ -9373,6 +9373,17 @@ async function readJson(p) {
|
|
|
9373
9373
|
function toPascalCase(name) {
|
|
9374
9374
|
return name.replace(/[^a-zA-Z0-9\s\-_]/g, "").split(/[\s\-_]+/).filter(Boolean).map((w) => w.charAt(0).toUpperCase() + w.slice(1)).join("");
|
|
9375
9375
|
}
|
|
9376
|
+
function normalizeExecutionBaseRef(ref, fallbackRef) {
|
|
9377
|
+
const candidates = [ref, fallbackRef].filter(
|
|
9378
|
+
(value) => typeof value === "string" && value.trim()
|
|
9379
|
+
);
|
|
9380
|
+
const selected = candidates.length > 0 ? String(candidates[0]).trim() : "";
|
|
9381
|
+
if (!selected) return "origin/main";
|
|
9382
|
+
if (selected.startsWith("origin/") || selected.startsWith("refs/")) {
|
|
9383
|
+
return selected;
|
|
9384
|
+
}
|
|
9385
|
+
return `origin/${selected}`;
|
|
9386
|
+
}
|
|
9376
9387
|
async function assembleCompany({
|
|
9377
9388
|
companyName,
|
|
9378
9389
|
companyDescription = "",
|
|
@@ -10024,6 +10035,18 @@ Read: \`docs/${doc}\`
|
|
|
10024
10035
|
if (!policy || typeof policy !== "object") return null;
|
|
10025
10036
|
if (policy.defaultMode === "isolated_workspace") {
|
|
10026
10037
|
if (!enableIsolatedWorktrees || isFreshLocalRepo(workspace)) return null;
|
|
10038
|
+
const strategy = policy.workspaceStrategy;
|
|
10039
|
+
if (!strategy || typeof strategy !== "object") return policy;
|
|
10040
|
+
if (strategy.type !== "git_worktree") return policy;
|
|
10041
|
+
const workspaceStrategy = { ...strategy };
|
|
10042
|
+
const normalizedBaseRef = normalizeExecutionBaseRef(
|
|
10043
|
+
workspaceStrategy.baseRef,
|
|
10044
|
+
workspace?.repoRef || workspace?.defaultRef
|
|
10045
|
+
);
|
|
10046
|
+
if (normalizedBaseRef) {
|
|
10047
|
+
workspaceStrategy.baseRef = normalizedBaseRef;
|
|
10048
|
+
}
|
|
10049
|
+
return { ...policy, workspaceStrategy };
|
|
10027
10050
|
}
|
|
10028
10051
|
return policy;
|
|
10029
10052
|
};
|
|
@@ -10624,11 +10647,11 @@ var PaperclipClient = class {
|
|
|
10624
10647
|
});
|
|
10625
10648
|
}
|
|
10626
10649
|
/**
|
|
10627
|
-
* Resolve a
|
|
10650
|
+
* Resolve a role name to a Paperclip API role enum.
|
|
10628
10651
|
* Uses role.json's paperclipRole field, falls back to 'general'.
|
|
10629
10652
|
*/
|
|
10630
|
-
static resolveRole(
|
|
10631
|
-
if (BASE_ROLE_MAP[
|
|
10653
|
+
static resolveRole(roleName, roleData) {
|
|
10654
|
+
if (BASE_ROLE_MAP[roleName]) return BASE_ROLE_MAP[roleName];
|
|
10632
10655
|
if (roleData?.paperclipRole) return roleData.paperclipRole;
|
|
10633
10656
|
return "general";
|
|
10634
10657
|
}
|
|
@@ -11098,7 +11121,7 @@ var plugin = definePlugin({
|
|
|
11098
11121
|
const cfg = await ctx.config.get() ?? {};
|
|
11099
11122
|
const companyName = typeof params.companyName === "string" && params.companyName.trim() ? params.companyName.trim() : "Preview";
|
|
11100
11123
|
const templatesDir = await ensureTemplatesDir(cfg);
|
|
11101
|
-
tmpDir = path2.join(os.tmpdir(), `
|
|
11124
|
+
tmpDir = path2.join(os.tmpdir(), `company-wizard-preview-${Date.now()}`);
|
|
11102
11125
|
const companiesDir = resolveCompaniesDir(cfg);
|
|
11103
11126
|
const [presets, allModules] = await Promise.all([
|
|
11104
11127
|
loadPresets(templatesDir),
|