@swarm.ing/pieui 2.0.26 → 2.0.27
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 +42 -15
- package/dist/code/args.d.ts.map +1 -1
- package/dist/code/commands/cardAddStory.d.ts +3 -1
- package/dist/code/commands/cardAddStory.d.ts.map +1 -1
- package/dist/code/introspection/extractEvents.d.ts +1 -1
- package/dist/code/introspection/extractEvents.d.ts.map +1 -1
- package/dist/code/types.d.ts +1 -0
- package/dist/code/types.d.ts.map +1 -1
- package/dist/tests/cardPullJson.test.d.ts +12 -0
- package/dist/tests/cardPullJson.test.d.ts.map +1 -0
- package/dist/tests/checkSyncConfig.test.d.ts +12 -0
- package/dist/tests/checkSyncConfig.test.d.ts.map +1 -0
- package/dist/tests/dumpMetadataEnvelope.test.d.ts +13 -0
- package/dist/tests/dumpMetadataEnvelope.test.d.ts.map +1 -0
- package/dist/tests/extractEventsStrict.test.d.ts +12 -0
- package/dist/tests/extractEventsStrict.test.d.ts.map +1 -0
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -188247,6 +188247,7 @@ var consumeFlags = (tokens) => {
|
|
|
188247
188247
|
const positionals = [];
|
|
188248
188248
|
let ajax = false;
|
|
188249
188249
|
let io = false;
|
|
188250
|
+
let force = false;
|
|
188250
188251
|
for (let i = 0;i < tokens.length; i++) {
|
|
188251
188252
|
const tok = tokens[i];
|
|
188252
188253
|
if (tok === "--ajax") {
|
|
@@ -188257,6 +188258,10 @@ var consumeFlags = (tokens) => {
|
|
|
188257
188258
|
io = true;
|
|
188258
188259
|
continue;
|
|
188259
188260
|
}
|
|
188261
|
+
if (tok === "--force" || tok === "-f") {
|
|
188262
|
+
force = true;
|
|
188263
|
+
continue;
|
|
188264
|
+
}
|
|
188260
188265
|
if (tok === "--user" && tokens[i + 1]) {
|
|
188261
188266
|
flags.remoteUserId = tokens[i + 1];
|
|
188262
188267
|
i++;
|
|
@@ -188322,7 +188327,7 @@ var consumeFlags = (tokens) => {
|
|
|
188322
188327
|
}
|
|
188323
188328
|
positionals.push(tok);
|
|
188324
188329
|
}
|
|
188325
|
-
return { positionals, flags, boolFlags: { ajax, io } };
|
|
188330
|
+
return { positionals, flags, boolFlags: { ajax, io, force } };
|
|
188326
188331
|
};
|
|
188327
188332
|
var parseArgs = (argv) => {
|
|
188328
188333
|
const [command = ""] = argv;
|
|
@@ -188402,6 +188407,7 @@ var parseArgs = (argv) => {
|
|
|
188402
188407
|
result.componentName = positionals[0];
|
|
188403
188408
|
} else if (action === "add-story") {
|
|
188404
188409
|
result.componentName = positionals[0];
|
|
188410
|
+
result.cardAddStoryForce = boolFlags.force;
|
|
188405
188411
|
} else if (action === "remote") {
|
|
188406
188412
|
const sub = positionals[0];
|
|
188407
188413
|
if (sub && VALID_CARD_REMOTE_ACTIONS.includes(sub)) {
|
|
@@ -188486,7 +188492,7 @@ var ALL_LINES = [
|
|
|
188486
188492
|
" card remove <Name> Remove a component from piecomponents/",
|
|
188487
188493
|
" card list-events <Name> List methods keys on the registered PieCard",
|
|
188488
188494
|
" card add-event <Name> <event> Add a new methods key with a default handler",
|
|
188489
|
-
" card add-story <Name>
|
|
188495
|
+
" card add-story <Name> [--force] Generate a Storybook stories.tsx wired to PieCard methods",
|
|
188490
188496
|
" card dump-metadata <Name> [--out file.json] Dump full PieMetadata JSON for the component",
|
|
188491
188497
|
" card check-sync <Name> Compare TS ↔ Python metadata; prompt for backend project path if not configured",
|
|
188492
188498
|
" card remote list [--user U] [--project S] List remote components",
|
|
@@ -188556,7 +188562,7 @@ var CARD_LINES = [
|
|
|
188556
188562
|
" remove <Name> Remove a component from piecomponents/",
|
|
188557
188563
|
" list-events <Name> List methods keys on the registered PieCard",
|
|
188558
188564
|
" add-event <Name> <event> Add a new methods key with a default handler",
|
|
188559
|
-
" add-story <Name>
|
|
188565
|
+
" add-story <Name> [--force] Generate a Storybook stories.tsx wired to PieCard methods (--force overwrites)",
|
|
188560
188566
|
" dump-metadata <Name> [--out file.json] Dump full PieMetadata JSON for the component",
|
|
188561
188567
|
" check-sync <Name> Compare TS ↔ Python metadata; prompts for backend project path",
|
|
188562
188568
|
" remote ... Remote storage operations (see `pieui card remote --help`)",
|
|
@@ -195647,7 +195653,12 @@ var extractKeysFromObjectLiteral = (objLiteral, sourceFile) => {
|
|
|
195647
195653
|
for (const prop of objLiteral.properties) {
|
|
195648
195654
|
if (ts2.isSpreadAssignment(prop)) {
|
|
195649
195655
|
const start = ts2.getLineAndCharacterOfPosition(sourceFile, prop.getStart());
|
|
195650
|
-
throw new
|
|
195656
|
+
throw new IntrospectionError("<PieCard methods={…}> must be an inline object literal — " + "spread/rest is not allowed", {
|
|
195657
|
+
sourceFile: sourceFile.fileName,
|
|
195658
|
+
line: start.line + 1,
|
|
195659
|
+
column: start.character + 1,
|
|
195660
|
+
hint: "list all handler keys explicitly: methods={{ key: fn }}"
|
|
195661
|
+
});
|
|
195651
195662
|
}
|
|
195652
195663
|
if (ts2.isPropertyAssignment(prop) || ts2.isShorthandPropertyAssignment(prop) || ts2.isMethodDeclaration(prop)) {
|
|
195653
195664
|
const name = prop.name;
|
|
@@ -195657,7 +195668,12 @@ var extractKeysFromObjectLiteral = (objLiteral, sourceFile) => {
|
|
|
195657
195668
|
keys.push(name.text);
|
|
195658
195669
|
} else if (ts2.isComputedPropertyName(name)) {
|
|
195659
195670
|
const start = ts2.getLineAndCharacterOfPosition(sourceFile, name.getStart());
|
|
195660
|
-
throw new
|
|
195671
|
+
throw new IntrospectionError("<PieCard methods={…}> keys must be static identifiers " + "or string literals — computed keys are not allowed", {
|
|
195672
|
+
sourceFile: sourceFile.fileName,
|
|
195673
|
+
line: start.line + 1,
|
|
195674
|
+
column: start.character + 1,
|
|
195675
|
+
hint: "use a plain identifier or string literal as the key"
|
|
195676
|
+
});
|
|
195661
195677
|
}
|
|
195662
195678
|
}
|
|
195663
195679
|
}
|
|
@@ -195681,11 +195697,19 @@ var extractEvents = (files) => {
|
|
|
195681
195697
|
const init = methodsAttr.initializer;
|
|
195682
195698
|
if (!ts2.isJsxExpression(init) || !init.expression) {
|
|
195683
195699
|
const start = ts2.getLineAndCharacterOfPosition(sourceFile, init.getStart());
|
|
195684
|
-
throw new
|
|
195700
|
+
throw new IntrospectionError("<PieCard methods={…}> must be set with an inline object literal", {
|
|
195701
|
+
sourceFile: file,
|
|
195702
|
+
line: start.line + 1,
|
|
195703
|
+
hint: "use methods={{...}} directly on the PieCard element"
|
|
195704
|
+
});
|
|
195685
195705
|
}
|
|
195686
195706
|
if (!ts2.isObjectLiteralExpression(init.expression)) {
|
|
195687
195707
|
const start = ts2.getLineAndCharacterOfPosition(sourceFile, init.expression.getStart());
|
|
195688
|
-
throw new
|
|
195708
|
+
throw new IntrospectionError(`<PieCard methods={…}> must be an inline object literal ` + `(found ${ts2.SyntaxKind[init.expression.kind]})`, {
|
|
195709
|
+
sourceFile: file,
|
|
195710
|
+
line: start.line + 1,
|
|
195711
|
+
hint: "inline the handler map directly: methods={{ click: (p) => ... }}"
|
|
195712
|
+
});
|
|
195689
195713
|
}
|
|
195690
195714
|
for (const k2 of extractKeysFromObjectLiteral(init.expression, sourceFile)) {
|
|
195691
195715
|
events.add(k2);
|
|
@@ -196369,9 +196393,10 @@ var renderStoryFile = (componentName, events, payloads) => {
|
|
|
196369
196393
|
`);
|
|
196370
196394
|
return `import type { Meta, StoryObj } from '@storybook/react'
|
|
196371
196395
|
import { withPieCard } from '@swarm.ing/pieui/storybook'
|
|
196372
|
-
import ${componentName} from '
|
|
196396
|
+
import ${componentName} from './ui/${componentName}'
|
|
196373
196397
|
|
|
196374
196398
|
const meta: Meta<typeof ${componentName}> = {
|
|
196399
|
+
title: 'PieComponents/${componentName}',
|
|
196375
196400
|
component: ${componentName},
|
|
196376
196401
|
decorators: [withPieCard],
|
|
196377
196402
|
parameters: {
|
|
@@ -196398,7 +196423,7 @@ export const Default: Story = {
|
|
|
196398
196423
|
}
|
|
196399
196424
|
`;
|
|
196400
196425
|
};
|
|
196401
|
-
var cardAddStoryCommand = (componentName) => {
|
|
196426
|
+
var cardAddStoryCommand = (componentName, options = {}) => {
|
|
196402
196427
|
if (!componentName) {
|
|
196403
196428
|
throw new Error("Component name is required");
|
|
196404
196429
|
}
|
|
@@ -196431,13 +196456,14 @@ var cardAddStoryCommand = (componentName) => {
|
|
|
196431
196456
|
}
|
|
196432
196457
|
}
|
|
196433
196458
|
}
|
|
196434
|
-
const storyPath = import_node_path14.default.join(componentDir,
|
|
196435
|
-
|
|
196436
|
-
|
|
196459
|
+
const storyPath = import_node_path14.default.join(componentDir, `${componentName}.stories.tsx`);
|
|
196460
|
+
const storyExists = import_node_fs13.default.existsSync(storyPath);
|
|
196461
|
+
if (storyExists && !options.force) {
|
|
196462
|
+
throw new Error(`Story file already exists: ${storyPath}
|
|
196463
|
+
` + `Pass --force to overwrite.`);
|
|
196437
196464
|
}
|
|
196438
|
-
import_node_fs13.default.mkdirSync(import_node_path14.default.dirname(storyPath), { recursive: true });
|
|
196439
196465
|
import_node_fs13.default.writeFileSync(storyPath, renderStoryFile(componentName, events, payloads), "utf8");
|
|
196440
|
-
console.log(`[pieui] Story created: ${storyPath}`);
|
|
196466
|
+
console.log(`[pieui] Story ${storyExists ? "overwritten" : "created"}: ${storyPath}`);
|
|
196441
196467
|
if (events.length > 0) {
|
|
196442
196468
|
console.log(`[pieui] Methods wired: ${events.join(", ")}`);
|
|
196443
196469
|
} else {
|
|
@@ -197640,6 +197666,7 @@ var main = async () => {
|
|
|
197640
197666
|
cardAction,
|
|
197641
197667
|
cardAjax,
|
|
197642
197668
|
cardIo,
|
|
197669
|
+
cardAddStoryForce,
|
|
197643
197670
|
cardRemoteAction,
|
|
197644
197671
|
cardPullRef,
|
|
197645
197672
|
remoteUserId,
|
|
@@ -197751,7 +197778,7 @@ var main = async () => {
|
|
|
197751
197778
|
}
|
|
197752
197779
|
if (cardAction === "add-story") {
|
|
197753
197780
|
const name = requireName(componentName, "Component name");
|
|
197754
|
-
cardAddStoryCommand(name);
|
|
197781
|
+
cardAddStoryCommand(name, { force: cardAddStoryForce });
|
|
197755
197782
|
return;
|
|
197756
197783
|
}
|
|
197757
197784
|
if (cardAction === "remote") {
|
package/dist/code/args.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"args.d.ts","sourceRoot":"","sources":["../../src/code/args.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAOR,UAAU,EACb,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"args.d.ts","sourceRoot":"","sources":["../../src/code/args.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAOR,UAAU,EACb,MAAM,SAAS,CAAA;AAoKhB,eAAO,MAAM,SAAS,GAAI,MAAM,MAAM,EAAE,KAAG,UA0I1C,CAAA;AAED,MAAM,MAAM,SAAS,GACf,KAAK,GACL,OAAO,GACP,QAAQ,GACR,MAAM,GACN,WAAW,GACX,MAAM,GACN,aAAa,GACb,MAAM,GACN,cAAc,CAAA;AAEpB,eAAO,MAAM,eAAe,GAAI,MAAM,MAAM,EAAE,KAAG,SAAS,GAAG,IAe5D,CAAA;AAsMD,eAAO,MAAM,UAAU,GAAI,QAAO,SAAiB,SAwBlD,CAAA"}
|
|
@@ -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":"AAgIA,eAAO,MAAM,mBAAmB,GAC5B,eAAe,MAAM,EACrB,UAAS;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAO,KAClC,IA0FF,CAAA"}
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
*
|
|
20
20
|
* RETURNS: sorted array of unique event names (object-literal keys).
|
|
21
21
|
*
|
|
22
|
-
* THROWS:
|
|
22
|
+
* THROWS: IntrospectionError with file:line if `methods={…}` is anything other than
|
|
23
23
|
* a plain inline object literal with static keys. Specifically:
|
|
24
24
|
* - `methods={spread}` (Identifier initializer) — throws.
|
|
25
25
|
* - `methods={{ ...other }}` (spread element) — throws.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extractEvents.d.ts","sourceRoot":"","sources":["../../../src/code/introspection/extractEvents.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;
|
|
1
|
+
{"version":3,"file":"extractEvents.d.ts","sourceRoot":"","sources":["../../../src/code/introspection/extractEvents.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AA2GH;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,aAAa,GAAI,OAAO,MAAM,EAAE,KAAG,MAAM,EAmErD,CAAA"}
|
package/dist/code/types.d.ts
CHANGED
package/dist/code/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/code/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,GAAG,MAAM,wBAAwB,CAAA;AAElD,eAAO,MAAM,iBAAiB,0BAA0B,CAAA;AACxD,eAAO,MAAM,iBAAiB,yBAAyB,CAAA;AAEvD,MAAM,MAAM,aAAa,GACnB,QAAQ,GACR,SAAS,GACT,kBAAkB,GAClB,mBAAmB,CAAA;AAEzB,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,aAAa,CAAA;AAC9C,MAAM,MAAM,UAAU,GAChB,KAAK,GACL,MAAM,GACN,MAAM,GACN,MAAM,GACN,QAAQ,GACR,aAAa,GACb,WAAW,GACX,QAAQ,GACR,eAAe,GACf,YAAY,GACZ,WAAW,CAAA;AACjB,MAAM,MAAM,gBAAgB,GACtB,MAAM,GACN,MAAM,GACN,MAAM,GACN,QAAQ,GACR,SAAS,GACT,QAAQ,GACR,SAAS,CAAA;AACf,MAAM,MAAM,UAAU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AC,MAAM,EAAE,UAAU,CAAC,CAAA;IAC7C,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACvC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,gBAAgB,EAAE,UAAU,GAAG,IAAI,CAAA;IACnC,QAAQ,EAAE,MAAM,EAAE,CAAA;CACrB,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tests for `pieui card pull <ref>` — JSON file and URL sources.
|
|
3
|
+
*
|
|
4
|
+
* Critical invariants:
|
|
5
|
+
* - Reads only the `{typescript: {...}}` envelope; rejects python-only JSON.
|
|
6
|
+
* - File content is restored verbatim (no whitespace/encoding corruption).
|
|
7
|
+
* - Path traversal (`..' in file.path) is rejected.
|
|
8
|
+
* - Existing component directory is fully replaced.
|
|
9
|
+
* - Error message lists top-level keys when envelope is missing.
|
|
10
|
+
*/
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=cardPullJson.test.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cardPullJson.test.d.ts","sourceRoot":"","sources":["../../src/tests/cardPullJson.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tests for `pieui card check-sync` — config handling and delegation.
|
|
3
|
+
*
|
|
4
|
+
* Critical invariants:
|
|
5
|
+
* - Non-interactive shell without backendProjectDir in config → descriptive
|
|
6
|
+
* error message, exits without spawning python.
|
|
7
|
+
* - Reads backendProjectDir from .pie/config.json.
|
|
8
|
+
* - Does NOT read the `python` envelope (TS side is just a proxy).
|
|
9
|
+
* - Returns exit code 0 on success, 1 on failure.
|
|
10
|
+
*/
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=checkSyncConfig.test.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkSyncConfig.test.d.ts","sourceRoot":"","sources":["../../src/tests/checkSyncConfig.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tests for `pieui card dump-metadata` envelope format policy.
|
|
3
|
+
*
|
|
4
|
+
* Critical invariants:
|
|
5
|
+
* - Output is always wrapped in `{ typescript: {...} }` — never bare.
|
|
6
|
+
* - Writing to --out file shallow-merges: only the `typescript` key is
|
|
7
|
+
* replaced; sibling keys (e.g. `python`) are preserved.
|
|
8
|
+
* - Re-running on the same --out file does not corrupt the sibling key.
|
|
9
|
+
* - Existing --out file must be valid JSON and a JSON object; otherwise
|
|
10
|
+
* a descriptive error is thrown.
|
|
11
|
+
*/
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=dumpMetadataEnvelope.test.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dumpMetadataEnvelope.test.d.ts","sourceRoot":"","sources":["../../src/tests/dumpMetadataEnvelope.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tests for `extractEvents` strictness policy.
|
|
3
|
+
*
|
|
4
|
+
* Critical invariants (per QA test plan):
|
|
5
|
+
* - methods={handlers} (variable reference) → IntrospectionError
|
|
6
|
+
* - <PieCard {...spread} /> → IntrospectionError
|
|
7
|
+
* - Inline object literal methods={{...}} → events extracted correctly
|
|
8
|
+
* - 0-parameter handler → event still registered (empty schema)
|
|
9
|
+
* - Computed key in methods → IntrospectionError
|
|
10
|
+
*/
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=extractEventsStrict.test.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extractEventsStrict.test.d.ts","sourceRoot":"","sources":["../../src/tests/extractEventsStrict.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG"}
|