create-loomstack-app 0.0.2 → 0.0.3

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.
@@ -1083,7 +1083,7 @@ Create a production-ready loomstack application.`);
1083
1083
  const cwdIndex = argv.indexOf("--cwd");
1084
1084
  const cwdValue = cwdIndex >= 0 ? argv[cwdIndex + 1] : void 0;
1085
1085
  const positional = argv.filter(
1086
- (value, index) => value !== "--json" && value !== "--cwd" && index !== cwdIndex + 1 && !value.startsWith("-")
1086
+ (value, index) => value !== "--json" && value !== "--cwd" && (cwdIndex < 0 || index !== cwdIndex + 1) && !value.startsWith("-")
1087
1087
  );
1088
1088
  const name = positional[0];
1089
1089
  if (!name || cwdIndex >= 0 && !cwdValue) {
@@ -1094,7 +1094,7 @@ Repair: ${error.repair}`);
1094
1094
  return 1;
1095
1095
  }
1096
1096
  try {
1097
- const result = createApp(resolve4(cwdValue ?? process.cwd()), name);
1097
+ const result = createApp(resolve4(cwdValue ?? io.cwd?.() ?? process.cwd()), name);
1098
1098
  if (json) io.stdout(JSON.stringify({ ok: true, data: result }));
1099
1099
  else {
1100
1100
  io.stdout(`Created loomstack app: ${result.appName}`);
package/dist/cli.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  runCreateLoomStackApp
4
- } from "./chunk-EQQCF3Q6.js";
4
+ } from "./chunk-PJ2RR44E.js";
5
5
 
6
6
  // src/cli.ts
7
7
  process.exitCode = runCreateLoomStackApp(process.argv.slice(2));
package/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  interface CreateLoomStackAppIO {
2
2
  stdout: (text: string) => void;
3
3
  stderr: (text: string) => void;
4
+ cwd?: () => string;
4
5
  }
5
6
  declare function runCreateLoomStackApp(argv: string[], io?: CreateLoomStackAppIO): number;
6
7
 
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  runCreateLoomStackApp
3
- } from "./chunk-EQQCF3Q6.js";
3
+ } from "./chunk-PJ2RR44E.js";
4
4
  export {
5
5
  runCreateLoomStackApp
6
6
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-loomstack-app",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "description": "Create a full-stack loomstack application",
5
5
  "type": "module",
6
6
  "bin": {