@swarm.ing/pieui 2.0.29 → 2.0.30
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
CHANGED
|
@@ -196682,6 +196682,23 @@ var cardAddStoryCommand = (componentName, options = {}) => {
|
|
|
196682
196682
|
} else if (result.addedPerSite.length === 0) {
|
|
196683
196683
|
console.log(`[pieui] <PieCard> forwarding already complete in ${uiPath}`);
|
|
196684
196684
|
}
|
|
196685
|
+
const mainPath = findStorybookMainPath(process.cwd());
|
|
196686
|
+
if (!mainPath) {
|
|
196687
|
+
const bunBin = process.env.PIEUI_CREATE_BUN_BIN || "bun";
|
|
196688
|
+
installAndWireStorybook(process.cwd(), bunBin);
|
|
196689
|
+
} else {
|
|
196690
|
+
const addedAddon = patchStorybookMainAddons(mainPath);
|
|
196691
|
+
const addedStories = patchStorybookMainStories(mainPath);
|
|
196692
|
+
if (addedAddon) {
|
|
196693
|
+
console.log(`[pieui] Added '${PIEUI_STORYBOOK_ADDON}' to ${mainPath}`);
|
|
196694
|
+
}
|
|
196695
|
+
if (addedStories) {
|
|
196696
|
+
console.log(`[pieui] Added '${PIEUI_STORYBOOK_STORIES_GLOB}' to stories in ${mainPath}`);
|
|
196697
|
+
}
|
|
196698
|
+
if (!addedAddon && !addedStories) {
|
|
196699
|
+
console.log(`[pieui] Storybook config already wired (${import_node_path15.default.relative(process.cwd(), mainPath)})`);
|
|
196700
|
+
}
|
|
196701
|
+
}
|
|
196685
196702
|
printRequirements(cardAddStoryRequirements(componentName));
|
|
196686
196703
|
};
|
|
196687
196704
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cardAddStory.d.ts","sourceRoot":"","sources":["../../../src/code/commands/cardAddStory.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cardAddStory.d.ts","sourceRoot":"","sources":["../../../src/code/commands/cardAddStory.ts"],"names":[],"mappings":"AA4IA,eAAO,MAAM,mBAAmB,GAC5B,eAAe,MAAM,EACrB,UAAS;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAO,KAClC,IAyHF,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preset.d.cts","sourceRoot":"","sources":["../../../src/storybook/addon/preset.cjs"],"names":[],"mappings":"AAgByB,qDAGxB"}
|
|
1
|
+
{"version":3,"file":"preset.d.cts","sourceRoot":"","sources":["../../../src/storybook/addon/preset.cjs"],"names":[],"mappings":"AAgByB,qDAGxB;AAQmB,qDAUnB"}
|
|
@@ -18,3 +18,21 @@ exports.managerEntries = (entry = []) => [
|
|
|
18
18
|
...entry,
|
|
19
19
|
path.join(__dirname, 'manager.js'),
|
|
20
20
|
]
|
|
21
|
+
|
|
22
|
+
// Force-dedupe React and pieui so linked installs (`file:`/`npm link`) that
|
|
23
|
+
// drag pieui's own node_modules along don't end up with two React instances.
|
|
24
|
+
// Two Reacts → two distinct PieConfigContext objects → providers and
|
|
25
|
+
// consumers don't match → "must be used within PieConfigProvider". Published
|
|
26
|
+
// npm installs already dedupe via peerDependencies; declaring this here is a
|
|
27
|
+
// safe no-op there.
|
|
28
|
+
exports.viteFinal = async (config) => {
|
|
29
|
+
config.resolve = config.resolve || {}
|
|
30
|
+
const dedupe = new Set([
|
|
31
|
+
...(config.resolve.dedupe || []),
|
|
32
|
+
'react',
|
|
33
|
+
'react-dom',
|
|
34
|
+
'@swarm.ing/pieui',
|
|
35
|
+
])
|
|
36
|
+
config.resolve.dedupe = Array.from(dedupe)
|
|
37
|
+
return config
|
|
38
|
+
}
|