@arcote.tech/arc-cli 0.5.7 → 0.5.8

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/dist/index.js CHANGED
@@ -26358,7 +26358,7 @@ import {
26358
26358
  rmSync,
26359
26359
  writeFileSync as writeFileSync6
26360
26360
  } from "fs";
26361
- import { dirname as dirname5, join as join8, relative as relative3 } from "path";
26361
+ import { basename as basename2, dirname as dirname5, join as join8, relative as relative3 } from "path";
26362
26362
 
26363
26363
  // src/i18n/index.ts
26364
26364
  import { existsSync as existsSync4, mkdirSync as mkdirSync4, readFileSync as readFileSync4, writeFileSync as writeFileSync4 } from "fs";
@@ -26929,7 +26929,7 @@ async function buildModulesBundle(rootDir, outDir, packages, cache, noCache) {
26929
26929
  const unitId = "modules-bundle";
26930
26930
  const pkgHashes = packages.map((p) => ({
26931
26931
  name: p.name,
26932
- safeName: p.path.split("/").pop(),
26932
+ safeName: basename2(p.path),
26933
26933
  srcHash: pkgSourceHash(p)
26934
26934
  }));
26935
26935
  const inputHash = sha256OfJson({
@@ -26960,7 +26960,7 @@ async function buildModulesBundle(rootDir, outDir, packages, cache, noCache) {
26960
26960
  const entrypoints = [];
26961
26961
  const fileToName = new Map;
26962
26962
  for (const pkg of packages) {
26963
- const safeName = pkg.path.split("/").pop();
26963
+ const safeName = basename2(pkg.path);
26964
26964
  const moduleName = pkg.name.includes("/") ? pkg.name.split("/").pop() : pkg.name;
26965
26965
  fileToName.set(safeName, moduleName);
26966
26966
  const wrapperFile = join8(tmpDir, `${safeName}.ts`);
@@ -27002,7 +27002,7 @@ async function buildModulesBundle(rootDir, outDir, packages, cache, noCache) {
27002
27002
  rmSync(tmpDir, { recursive: true, force: true });
27003
27003
  const outputHashes = {};
27004
27004
  const modules = result.outputs.filter((o) => o.kind === "entry-point").map((o) => {
27005
- const file = o.path.split("/").pop();
27005
+ const file = basename2(o.path);
27006
27006
  const safeName = file.replace(/\.js$/, "");
27007
27007
  const bytes = readFileSync7(o.path);
27008
27008
  const hash = sha256Hex(bytes);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcote.tech/arc-cli",
3
- "version": "0.5.7",
3
+ "version": "0.5.8",
4
4
  "description": "CLI tool for Arc framework",
5
5
  "module": "index.ts",
6
6
  "main": "dist/index.js",
@@ -12,12 +12,12 @@
12
12
  "build": "bun build --target=bun ./src/index.ts --outdir=dist --external @arcote.tech/arc --external @arcote.tech/arc-ds --external @arcote.tech/arc-react --external @arcote.tech/platform && chmod +x dist/index.js"
13
13
  },
14
14
  "dependencies": {
15
- "@arcote.tech/arc": "^0.5.7",
16
- "@arcote.tech/arc-ds": "^0.5.7",
17
- "@arcote.tech/arc-react": "^0.5.7",
18
- "@arcote.tech/arc-host": "^0.5.7",
19
- "@arcote.tech/arc-adapter-db-sqlite": "^0.5.7",
20
- "@arcote.tech/platform": "^0.5.7",
15
+ "@arcote.tech/arc": "^0.5.8",
16
+ "@arcote.tech/arc-ds": "^0.5.8",
17
+ "@arcote.tech/arc-react": "^0.5.8",
18
+ "@arcote.tech/arc-host": "^0.5.8",
19
+ "@arcote.tech/arc-adapter-db-sqlite": "^0.5.8",
20
+ "@arcote.tech/platform": "^0.5.8",
21
21
  "@clack/prompts": "^0.9.0",
22
22
  "commander": "^11.1.0",
23
23
  "chokidar": "^3.5.3",
@@ -7,7 +7,7 @@ import {
7
7
  rmSync,
8
8
  writeFileSync,
9
9
  } from "fs";
10
- import { dirname, join, relative } from "path";
10
+ import { basename, dirname, join, relative } from "path";
11
11
  import type { BuildManifest, ModuleDescriptor } from "@arcote.tech/platform";
12
12
  import { buildTypeDeclarations } from "../utils/build";
13
13
  import { i18nExtractPlugin, finalizeTranslations } from "../i18n";
@@ -306,7 +306,7 @@ export async function buildModulesBundle(
306
306
  // we run a single Bun.build for the whole bundle (chunk sharing wins).
307
307
  const pkgHashes = packages.map((p) => ({
308
308
  name: p.name,
309
- safeName: p.path.split("/").pop()!,
309
+ safeName: basename(p.path),
310
310
  srcHash: pkgSourceHash(p),
311
311
  }));
312
312
 
@@ -346,7 +346,7 @@ export async function buildModulesBundle(
346
346
  const fileToName = new Map<string, string>();
347
347
 
348
348
  for (const pkg of packages) {
349
- const safeName = pkg.path.split("/").pop()!;
349
+ const safeName = basename(pkg.path);
350
350
  const moduleName = pkg.name.includes("/") ? pkg.name.split("/").pop()! : pkg.name;
351
351
  fileToName.set(safeName, moduleName);
352
352
 
@@ -397,7 +397,7 @@ export async function buildModulesBundle(
397
397
  const modules: ModuleDescriptor[] = result.outputs
398
398
  .filter((o) => o.kind === "entry-point")
399
399
  .map((o) => {
400
- const file = o.path.split("/").pop()!;
400
+ const file = basename(o.path);
401
401
  const safeName = file.replace(/\.js$/, "");
402
402
  const bytes = readFileSync(o.path);
403
403
  const hash = sha256Hex(bytes);