@kuckit/cli 1.0.0 → 1.0.1

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/bin.js +39 -1
  2. package/package.json +2 -2
package/dist/bin.js CHANGED
@@ -224,6 +224,44 @@ async function doctor(options) {
224
224
  status: "pass",
225
225
  message: "SDK packages installed"
226
226
  });
227
+ const serverModulesPath = join(cwd, "apps", "server", "src", "config", "modules.ts");
228
+ const clientModulesPath = join(cwd, "apps", "web", "src", "modules.client.ts");
229
+ if (existsSync(serverModulesPath) && existsSync(clientModulesPath)) {
230
+ const serverContent = readFileSync(serverModulesPath, "utf-8");
231
+ const clientContent = readFileSync(clientModulesPath, "utf-8");
232
+ const serverModulePattern = /from\s+['"]@[^'"]+\/([^'"]+)-module['"]/g;
233
+ const clientModulePattern = /from\s+['"]@[^'"]+\/([^'"]+)-module\/client['"]/g;
234
+ const serverModules = /* @__PURE__ */ new Set();
235
+ const clientModules = /* @__PURE__ */ new Set();
236
+ let match;
237
+ while ((match = serverModulePattern.exec(serverContent)) !== null) {
238
+ const lineStart = serverContent.lastIndexOf("\n", match.index) + 1;
239
+ if (!serverContent.slice(lineStart, match.index).includes("//")) serverModules.add(match[1]);
240
+ }
241
+ while ((match = clientModulePattern.exec(clientContent)) !== null) {
242
+ const lineStart = clientContent.lastIndexOf("\n", match.index) + 1;
243
+ if (!clientContent.slice(lineStart, match.index).includes("//")) clientModules.add(match[1]);
244
+ }
245
+ const clientOnly = [...clientModules].filter((m) => !serverModules.has(m));
246
+ const serverOnly = [...serverModules].filter((m) => !clientModules.has(m));
247
+ if (clientOnly.length > 0) checks.push({
248
+ name: "module-sync",
249
+ status: "fail",
250
+ message: `Client modules without matching server modules (will cause 404 errors)`,
251
+ details: clientOnly.map((m) => ` - ${m}-module: registered in client but not server`)
252
+ });
253
+ else if (serverOnly.length > 0) checks.push({
254
+ name: "module-sync",
255
+ status: "warn",
256
+ message: `Server modules without matching client modules`,
257
+ details: serverOnly.map((m) => ` - ${m}-module: registered in server but not client`)
258
+ });
259
+ else if (serverModules.size > 0 || clientModules.size > 0) checks.push({
260
+ name: "module-sync",
261
+ status: "pass",
262
+ message: "Server and client modules are in sync"
263
+ });
264
+ }
227
265
  const report = {
228
266
  success: checks.every((c) => c.status !== "fail"),
229
267
  checks,
@@ -519,7 +557,7 @@ async function dbStudio(options) {
519
557
 
520
558
  //#endregion
521
559
  //#region src/lib/credentials.ts
522
- const DEFAULT_SERVER_URL = "http://localhost:3000";
560
+ const DEFAULT_SERVER_URL = "https://dev-app-nyh7i73bea-uc.a.run.app/";
523
561
  const CONFIG_DIR = join(homedir(), ".kuckit");
524
562
  const CONFIG_PATH = join(CONFIG_DIR, "config.json");
525
563
  function loadConfig$8() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kuckit/cli",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "CLI tools for Kuckit SDK module development",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -39,7 +39,7 @@
39
39
  },
40
40
  "scripts": {
41
41
  "build": "tsdown",
42
- "prepublishOnly": "npm run build && node ../../scripts/check-no-workspace-protocol.cjs"
42
+ "prepublishOnly": "npm run build && node ../../scripts/resolve-workspace-protocols.cjs && node ../../scripts/check-no-workspace-protocol.cjs"
43
43
  },
44
44
  "dependencies": {
45
45
  "@inquirer/prompts": "^7.2.1",