Skip to content

Commit cfa1dec

Browse files
committed
wip
1 parent 2d983d5 commit cfa1dec

File tree

1 file changed

+5
-29
lines changed

1 file changed

+5
-29
lines changed

examples/package.ts

Lines changed: 5 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ async function main() {
1313
},
1414
});
1515

16-
const x = sb.input({ type: "string" });
16+
const x = sb.input({ type: "string", default: "hello" });
1717
const y = sb.input({ type: "string" });
1818
const z = sb.input({ type: "object", properties: {} });
1919

@@ -26,43 +26,19 @@ async function main() {
2626
const packageable = substrate.createPackageable([a, b], { x, y, z });
2727
// console.log("packageable", JSON.stringify(packageable, null, 2));
2828

29-
30-
// alt.
31-
const mod = substrate.parameterize({
32-
nodes: [a, b],
33-
inputs: { x, y, z },
34-
});
35-
36-
const p = new Module(
37-
{
38-
module_json: mod.toJSON(),
39-
inputs: {
40-
x: "xxx",
41-
y: "yyy",
42-
z: {
43-
string: "hi",
44-
obj: { a: 123 },
45-
arr: ["123"],
46-
},
47-
},
48-
}
49-
);
50-
51-
// using the package node.
5229
const p = new Package(
5330
{
5431
package_json: packageable.toJSON(),
5532
inputs: {
56-
x: "xxx",
33+
// x: "xxx",
5734
y: "yyy",
5835
z: {
59-
string: "hi",
60-
obj: { a: 123 },
36+
// string: "hi",
37+
// obj: { a: 123 },
6138
arr: ["123"],
6239
},
6340
},
64-
},
65-
{ id: "PackageNode" },
41+
}, { id: "Package" }
6642
);
6743

6844
const c = new Box(

0 commit comments

Comments
 (0)