@akanjs/cli 3.1.1-rc.4 → 3.1.1-rc.5

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/.build-stamp CHANGED
@@ -1 +1 @@
1
- 1d5ee0aa09810bdd12aeba0494834f6a779e1a36738c336da1a29bcc976e334b
1
+ c2f52a581f7d932f25f8fc698ca2c44a156a0dd43cbbcc395b17ff6051065e5a
@@ -9,7 +9,7 @@ import"./index-trjhp735.js";
9
9
  import"./index-hrc7q2e6.js";
10
10
  import {
11
11
  PlatformTestRun
12
- } from "./index-rqcmr940.js";
12
+ } from "./index-b2hkbyf0.js";
13
13
  import"./index-xhnw8n74.js";
14
14
  import"./index-m9jj544v.js";
15
15
  import"./index-s28awecf.js";
@@ -23,7 +23,7 @@ import"./index-tvehn2sp.js";
23
23
  import"./index-mtf0cx8t.js";
24
24
  import {
25
25
  CloudScript2
26
- } from "./index-x6c29k5m.js";
26
+ } from "./index-rvqk63qp.js";
27
27
  import {
28
28
  writeOption,
29
29
  oneNativeTargetOption,
@@ -1,8 +1,8 @@
1
1
  // @bun
2
2
  import {
3
3
  CloudScript2
4
- } from "./index-x6c29k5m.js";
5
- import"./index-rqcmr940.js";
4
+ } from "./index-rvqk63qp.js";
5
+ import"./index-b2hkbyf0.js";
6
6
  import"./index-jn8gfj2b.js";
7
7
  import"./index-yaz7yks8.js";
8
8
  import"./index-sxqjxb4j.js";
@@ -115,7 +115,9 @@ this is the full contract behind them.
115
115
  document path**: they fire no hooks, so a model whose removal cascades or carries a `_postRemove` still goes
116
116
  through `remove<Model>(id)`.
117
117
  - The write-through pair is `pickAndWrite(id, data)` / `pickOneAndWrite(query, data)` — pick the document, write
118
- into it and save it, so the save hooks do run; reach for those when the write has to be seen by them.
118
+ into it and save it, so the save hooks do run; reach for those when the write has to be seen by them. A third
119
+ argument `{ touch: false }`, like `doc.save({ touch: false })`, keeps `updatedAt` while the hooks and live sync
120
+ still run — a nudge that re-sends a row its rooms must re-read, with no edit to stamp.
119
121
  - `upsertById(data, { preserveTimestamps })` writes a record whole under its own id, new or in place, with no
120
122
  hook: the write a sync or a backfill repeats safely, keeping the record's `createdAt`/`updatedAt` when asked.
121
123
 
@@ -1098,7 +1098,7 @@ ${run.format(results)}
1098
1098
  const rootPackageJson = await workspace.getPackageJson();
1099
1099
  if (!rootPackageJson.dependencies)
1100
1100
  throw new Error("No dependencies found in package.json");
1101
- for (const name of ["akanjs", "@akanjs/devkit"]) {
1101
+ for (const name of ["akanjs", "@akanjs/devkit", "@akanjs/cli"]) {
1102
1102
  if (rootPackageJson.dependencies[name])
1103
1103
  rootPackageJson.dependencies[name] = latestPublishedVersion;
1104
1104
  if (rootPackageJson.devDependencies?.[name])
@@ -23,7 +23,7 @@ import {
23
23
  } from "./index-mtf0cx8t.js";
24
24
  import {
25
25
  CloudRunner
26
- } from "./index-rqcmr940.js";
26
+ } from "./index-b2hkbyf0.js";
27
27
 
28
28
  // pkgs/@akanjs/cli/cloud/cloud.script.ts
29
29
  import { Logger } from "akanjs/common";
package/index.js CHANGED
@@ -22,18 +22,18 @@ import path from "path";
22
22
 
23
23
  // pkgs/@akanjs/cli/commandModules.ts
24
24
  var commandModules = {
25
- workspace: async () => (await import("./workspace.command-rq7mgq6f.js")).WorkspaceCommand,
25
+ workspace: async () => (await import("./workspace.command-mkqtxg1x.js")).WorkspaceCommand,
26
26
  agent: async () => (await import("./agent.command-2gay26y4.js")).AgentCommand,
27
27
  code: async () => (await import("./code.command-184jfjtk.js")).CodeCommand,
28
28
  application: async () => (await import("./application.command-a3aepayy.js")).ApplicationCommand,
29
29
  library: async () => (await import("./library.command-tnxw0yb4.js")).LibraryCommand,
30
- localRegistry: async () => (await import("./localRegistry.command-dy0byd6z.js")).LocalRegistryCommand,
30
+ localRegistry: async () => (await import("./localRegistry.command-xw0c03g4.js")).LocalRegistryCommand,
31
31
  package: async () => (await import("./package.command-b831nx2n.js")).PackageCommand,
32
32
  module: async () => (await import("./module.command-8pjk6vmm.js")).ModuleCommand,
33
33
  page: async () => (await import("./page.command-earjccmn.js")).PageCommand,
34
34
  context: async () => (await import("./context.command-kx0kzz3t.js")).ContextCommand,
35
- cloud: async () => (await import("./cloud.command-t2zdcw87.js")).CloudCommand,
36
- subspace: async () => (await import("./subspace.command-xjw4tc0p.js")).SubspaceCommand,
35
+ cloud: async () => (await import("./cloud.command-10j4z1cy.js")).CloudCommand,
36
+ subspace: async () => (await import("./subspace.command-fwzrs526.js")).SubspaceCommand,
37
37
  guideline: async () => (await import("./guideline.command-72psmnpx.js")).GuidelineCommand,
38
38
  scalar: async () => (await import("./scalar.command-vwjk94zr.js")).ScalarCommand,
39
39
  primitive: async () => (await import("./primitive.command-8dw8ra1x.js")).PrimitiveCommand,
@@ -24,7 +24,7 @@ import"./index-hrc7q2e6.js";
24
24
  import {
25
25
  getNpmRegistryUrl,
26
26
  CloudRunner
27
- } from "./index-rqcmr940.js";
27
+ } from "./index-b2hkbyf0.js";
28
28
  import"./index-tvehn2sp.js";
29
29
  import {
30
30
  PackageScript
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akanjs/cli",
3
- "version": "3.1.1-rc.4",
3
+ "version": "3.1.1-rc.5",
4
4
  "sourceType": "module",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -39,7 +39,7 @@
39
39
  "@earendil-works/pi-tui": "1.3.0",
40
40
  "@inquirer/prompts": "^8.7.3",
41
41
  "@tailwindcss/node": "^4.3.3",
42
- "akanjs": "3.1.1-rc.4",
42
+ "akanjs": "3.1.1-rc.5",
43
43
  "chalk": "^6.0.1",
44
44
  "commander": "^15.0.0",
45
45
  "dayjs": "^1.11.23",
@@ -816,7 +816,7 @@ class SubspaceRunner extends runner("subspace") {
816
816
  if (!asked)
817
817
  return { name: subspace.name, workspaceId, host, apps, libs: [], outcome: "cancelled", files: [] };
818
818
  const { libs } = await subspace.slice();
819
- const { CloudScript } = await import("./cloud.script-mm636g83.js");
819
+ const { CloudScript } = await import("./cloud.script-qb9jfncf.js");
820
820
  const { files } = await CommandContainer.get(CloudScript).uploadEnv(workspace, {
821
821
  host,
822
822
  workspaceId,
@@ -56,10 +56,10 @@ import {
56
56
  import {
57
57
  getNpmRegistryUrl,
58
58
  getLatestPackageVersion
59
- } from "./index-rqcmr940.js";
59
+ } from "./index-b2hkbyf0.js";
60
60
  import {
61
61
  CloudScript2
62
- } from "./index-x6c29k5m.js";
62
+ } from "./index-rvqk63qp.js";
63
63
  import"./index-hqaa4y3y.js";
64
64
  import"./index-zz5731qs.js";
65
65
  import"./index-q0e6604h.js";
@@ -134,10 +134,10 @@ class WorkspaceRunner extends runner("workspace") {
134
134
  owner = ""
135
135
  }) {
136
136
  const cwdPath = process.cwd();
137
- const workspaceRoot = path.join(cwdPath, dirname, repoName);
137
+ const workspaceRoot = path.resolve(cwdPath, dirname, repoName);
138
138
  const normalizedRegistryUrl = registryUrl ? getNpmRegistryUrl(registryUrl) : undefined;
139
139
  const workspace = WorkspaceExecutor.fromRoot({ workspaceRoot, repoName });
140
- const templateSpinner = workspace.spinning(`Creating workspace template files in ${dirname}/${repoName}...`);
140
+ const templateSpinner = workspace.spinning(`Creating workspace template files in ${workspaceRoot}...`);
141
141
  const latestTypesBunVersion = await getLatestPackageVersion("@types/bun", "latest", normalizedRegistryUrl);
142
142
  await workspace.applyTemplate({
143
143
  basePath: ".",
@@ -147,7 +147,7 @@ class WorkspaceRunner extends runner("workspace") {
147
147
  if (normalizedRegistryUrl)
148
148
  await workspace.writeFile(".npmrc", `registry=${normalizedRegistryUrl}/
149
149
  `);
150
- templateSpinner.succeed(`Workspace files created in ${dirname}/${repoName}`);
150
+ templateSpinner.succeed(`Workspace files created in ${workspaceRoot}`);
151
151
  const [rootPackageJson, peerDependencies] = await Promise.all([
152
152
  workspace.getPackageJson(),
153
153
  this.#getAkanPeerDependencies()
@@ -166,6 +166,7 @@ class WorkspaceRunner extends runner("workspace") {
166
166
  "@types/bun": latestTypesBunVersion,
167
167
  ...defaultWorkspaceTypeDependencies,
168
168
  "@akanjs/devkit": akanVersion,
169
+ "@akanjs/cli": akanVersion,
169
170
  ...typescript ? { typescript } : {}
170
171
  }
171
172
  };
@@ -319,7 +320,6 @@ AKAN_PUBLIC_LOG_LEVEL=debug
319
320
  }
320
321
 
321
322
  // pkgs/@akanjs/cli/workspace/workspace.script.ts
322
- import path2 from "path";
323
323
  import { Logger } from "akanjs/common";
324
324
  class WorkspaceScript extends script("workspace", [
325
325
  WorkspaceRunner,
@@ -372,10 +372,9 @@ class WorkspaceScript extends script("workspace", [
372
372
  } catch (_) {
373
373
  gitSpinner.fail("Git repository initialization failed. It's not fatal, you can commit manually");
374
374
  }
375
- const workspacePath = path2.join(dirname, repoName);
376
375
  Logger.rawLog(`
377
- \uD83C\uDF89 Welcome aboard! Workspace created in ${dirname}/${repoName}`);
378
- Logger.rawLog(`\uD83D\uDE80 Run \`cd ${workspacePath} && akan start ${appName}\` to start the development server.`);
376
+ \uD83C\uDF89 Welcome aboard! Workspace created in ${workspace.workspaceRoot}`);
377
+ Logger.rawLog(`\uD83D\uDE80 Run \`cd ${workspace.workspaceRoot} && akan start ${appName}\` to start the development server.`);
379
378
  Logger.rawLog(`
380
379
  \uD83D\uDC4B Happy coding!`);
381
380
  }