@elaraai/create-east 1.0.32 → 1.0.34

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.
Files changed (2) hide show
  1. package/dist/index.js +23 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -170,6 +170,29 @@ import { packageTasks } from "./packages/index.js";
170
170
  export default e3.package("${names.projectName}", "1.0.0", ...packageTasks);
171
171
  `;
172
172
  writeFileSync(join(projectDir, "src", "index.ts"), index);
173
+ const specPath = join(projectDir, "src", "index.spec.ts");
174
+ if (existsSync(specPath)) {
175
+ const spec = `import { East, IntegerType } from "@elaraai/east";
176
+ import { describeEast, Assert } from "@elaraai/east-node-std";
177
+ import pkg from "./index.js";
178
+ import { packageTasks } from "./packages/index.js";
179
+
180
+ // Generated by create-e3 \u2014 smoke tests for the generated multi-package
181
+ // app. Replace with real tests as you add inputs, tasks and dataflows.
182
+ describeEast("${names.displayName}", (test) => {
183
+ test("wires one task per workspace package", ($) => {
184
+ const count = $.const(BigInt(packageTasks.length), IntegerType);
185
+ $(Assert.equal(count, East.value(${members.length}n)));
186
+ });
187
+
188
+ test("exports the deployable package", ($) => {
189
+ const name = $.const(pkg.name);
190
+ $(Assert.equal(name, East.value("${names.projectName}")));
191
+ });
192
+ }, { exportOnly: true });
193
+ `;
194
+ writeFileSync(specPath, spec);
195
+ }
173
196
  }
174
197
  function generatePackages(options) {
175
198
  const { projectDir, templateDir, names, version, spec, log } = options;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elaraai/create-east",
3
- "version": "1.0.32",
3
+ "version": "1.0.34",
4
4
  "description": "Scaffold a new East project (AGPL-3.0, Node-only): npm create @elaraai/east",
5
5
  "type": "module",
6
6
  "bin": {