@fedify/cli 2.0.0-pr.479.1900 → 2.0.0-pr.479.1903

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/deno.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fedify/cli",
3
- "version": "2.0.0-pr.479.1900+0b40bf02",
3
+ "version": "2.0.0-pr.479.1903+05f65629",
4
4
  "license": "MIT",
5
5
  "exports": "./src/mod.ts",
6
6
  "imports": {
package/dist/deno.js CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  //#region deno.json
5
5
  var name = "@fedify/cli";
6
- var version = "2.0.0-pr.479.1900+0b40bf02";
6
+ var version = "2.0.0-pr.479.1903+05f65629";
7
7
  var license = "MIT";
8
8
  var exports = "./src/mod.ts";
9
9
  var imports = {
@@ -20,7 +20,7 @@ const BANNED_WFS = ["next"];
20
20
  *
21
21
  * @param dirs - Array of paths to generated app directories
22
22
  */
23
- async function runServerAndReadUser(dirs) {
23
+ async function runServerAndLookupUser(dirs) {
24
24
  const valid = dirs.filter(Boolean);
25
25
  if (valid.length === 0) {
26
26
  printErrorMessage`\nNo directories to lookup test.`;
@@ -63,7 +63,7 @@ async function testApp(dir) {
63
63
  mq
64
64
  ])}!`;
65
65
  if (!result) printMessage` Check out these files for more details:
66
- ${join(dir, "out.txt")}
66
+ ${join(dir, "out.txt")} and
67
67
  ${join(dir, "err.txt")}\n`;
68
68
  printMessage`\n`;
69
69
  return result;
@@ -146,9 +146,9 @@ function determinePort(server) {
146
146
  /listening on.*:(\d+)/i,
147
147
  /server.*:(\d+)/i,
148
148
  /port\s*:?\s*(\d+)/i,
149
- /localhost:(\d+)/i,
150
- /0\.0\.0\.0:(\d+)/i,
151
- /127\.0\.0\.1:(\d+)/i,
149
+ /https?:localhost:(\d+)/i,
150
+ /https?:0\.0\.0\.0:(\d+)/i,
151
+ /https?:127\.0\.0\.1:(\d+)/i,
152
152
  /https?:\/\/[^:]+:(\d+)/i
153
153
  ];
154
154
  const checkForPort = (data) => {
@@ -186,4 +186,4 @@ function determinePort(server) {
186
186
  }
187
187
 
188
188
  //#endregion
189
- export { runServerAndReadUser };
189
+ export { runServerAndLookupUser };
@@ -3,15 +3,15 @@
3
3
 
4
4
  import { printMessage } from "../../utils.js";
5
5
  import create_default, { filterOptions, generateTestCases } from "./create.js";
6
- import { runServerAndReadUser } from "./lookup.js";
6
+ import { runServerAndLookupUser } from "./lookup.js";
7
7
  import { join } from "node:path";
8
8
  import { optionNames } from "@optique/core";
9
- import { filter, map as map$1, pipe, tap } from "@fxts/core";
9
+ import { always, filter, map as map$1, pipe, tap, unless } from "@fxts/core";
10
10
 
11
11
  //#region src/init/test/run.ts
12
12
  const isDryRun = ({ dryRun }) => dryRun;
13
13
  const isHydRun = ({ hydRun }) => hydRun;
14
- const runTests = (dry) => ({ testDirPrefix, dryRun, hydRun,...options }) => pipe(options, printStartMessage, generateTestCases, filter(filterOptions), map$1(create_default(join(testDirPrefix, getMid(dryRun, hydRun, dry)), dry)), Array.fromAsync, runServerAndReadUser);
14
+ const runTests = (dry) => ({ testDirPrefix, dryRun, hydRun,...options }) => pipe(options, printStartMessage, generateTestCases, filter(filterOptions), map$1(create_default(join(testDirPrefix, getMid(dryRun, hydRun, dry)), dry)), Array.fromAsync, unless(always(dry), runServerAndLookupUser));
15
15
  const printStartMessage = tap(() => printMessage`\n
16
16
  Init Test start!
17
17
  Options: ${optionNames([
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fedify/cli",
3
- "version": "2.0.0-pr.479.1900+0b40bf02",
3
+ "version": "2.0.0-pr.479.1903+05f65629",
4
4
  "description": "CLI toolchain for Fedify and debugging ActivityPub",
5
5
  "keywords": [
6
6
  "fedify",
@@ -71,10 +71,10 @@
71
71
  "ora": "^8.2.0",
72
72
  "shiki": "^1.6.4",
73
73
  "srvx": "^0.8.7",
74
- "@fedify/sqlite": "2.0.0-pr.479.1900+0b40bf02",
75
- "@fedify/fedify": "2.0.0-pr.479.1900+0b40bf02",
76
- "@fedify/vocab-tools": "2.0.0-pr.479.1900+0b40bf02",
77
- "@fedify/vocab-runtime": "2.0.0-pr.479.1900+0b40bf02"
74
+ "@fedify/fedify": "2.0.0-pr.479.1903+05f65629",
75
+ "@fedify/vocab-runtime": "2.0.0-pr.479.1903+05f65629",
76
+ "@fedify/sqlite": "2.0.0-pr.479.1903+05f65629",
77
+ "@fedify/vocab-tools": "2.0.0-pr.479.1903+05f65629"
78
78
  },
79
79
  "devDependencies": {
80
80
  "@types/bun": "^1.2.23",
@@ -25,7 +25,7 @@ const BANNED_WFS: WebFramework[] = ["next"];
25
25
  *
26
26
  * @param dirs - Array of paths to generated app directories
27
27
  */
28
- export default async function runServerAndReadUser(
28
+ export default async function runServerAndLookupUser(
29
29
  dirs: string[],
30
30
  ): Promise<void> {
31
31
  const valid = dirs.filter(Boolean);
@@ -87,7 +87,7 @@ async function testApp(dir: string): Promise<boolean> {
87
87
  }!`;
88
88
  if (!result) {
89
89
  printMessage` Check out these files for more details:
90
- ${join(dir, "out.txt")}
90
+ ${join(dir, "out.txt")} and
91
91
  ${join(dir, "err.txt")}\n`;
92
92
  }
93
93
  printMessage`\n`;
@@ -204,9 +204,9 @@ function determinePort(
204
204
  /listening on.*:(\d+)/i,
205
205
  /server.*:(\d+)/i,
206
206
  /port\s*:?\s*(\d+)/i,
207
- /localhost:(\d+)/i,
208
- /0\.0\.0\.0:(\d+)/i,
209
- /127\.0\.0\.1:(\d+)/i,
207
+ /https?:localhost:(\d+)/i,
208
+ /https?:0\.0\.0\.0:(\d+)/i,
209
+ /https?:127\.0\.0\.1:(\d+)/i,
210
210
  /https?:\/\/[^:]+:(\d+)/i,
211
211
  ];
212
212
 
@@ -1,9 +1,9 @@
1
- import { filter, map, pipe, tap } from "@fxts/core";
1
+ import { always, filter, map, pipe, tap, unless } from "@fxts/core";
2
2
  import { optionNames } from "@optique/core";
3
3
  import { join } from "node:path";
4
4
  import { printMessage } from "../../utils.ts";
5
5
  import createTestApp, { filterOptions, generateTestCases } from "./create.ts";
6
- import runServerAndReadUser from "./lookup.ts";
6
+ import runServerAndLookupUser from "./lookup.ts";
7
7
  import type { InitTestData } from "./types.ts";
8
8
 
9
9
  export const isDryRun = <T extends { dryRun: boolean }>({ dryRun }: T) =>
@@ -21,7 +21,7 @@ export const runTests =
21
21
  filter(filterOptions),
22
22
  map(createTestApp(join(testDirPrefix, getMid(dryRun, hydRun, dry)), dry)),
23
23
  Array.fromAsync<string>,
24
- runServerAndReadUser,
24
+ unless(always(dry), runServerAndLookupUser),
25
25
  );
26
26
 
27
27
  const printStartMessage: <T>(t: T) => T = tap(