elit 3.6.1 → 3.6.2

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/Cargo.lock CHANGED
@@ -171,7 +171,7 @@ checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c"
171
171
 
172
172
  [[package]]
173
173
  name = "arboard"
174
- version = "3.6.1"
174
+ version = "3.6.2"
175
175
  source = "registry+https://github.com/rust-lang/crates.io-index"
176
176
  checksum = "0348a1c054491f4bfe6ab86a7b6ab1e44e45d899005de92f58b3df180b36ddaf"
177
177
  dependencies = [
@@ -1211,7 +1211,7 @@ dependencies = [
1211
1211
 
1212
1212
  [[package]]
1213
1213
  name = "elit-desktop"
1214
- version = "3.6.0"
1214
+ version = "3.6.2"
1215
1215
  dependencies = [
1216
1216
  "eframe",
1217
1217
  "http",
package/Cargo.toml CHANGED
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "elit-desktop"
3
- version = "3.6.0"
3
+ version = "3.6.2"
4
4
  edition = "2021"
5
5
  build = "desktop/build.rs"
6
6
 
package/README.md CHANGED
@@ -955,7 +955,7 @@ The package also exports `elit/test`, `elit/test-runtime`, and `elit/test-report
955
955
 
956
956
  Latest release notes live in [CHANGELOG.md](CHANGELOG.md).
957
957
 
958
- Highlights in `v3.6.0`:
958
+ Highlights in `v3.6.2`:
959
959
 
960
960
  - Added `elit pm` for detached background process management of shell commands, file targets, and WAPK apps.
961
961
  - Added `pm.apps[]` and `pm.dataDir` in `elit.config.*` for config-first process manager workflows.
package/dist/cli.cjs CHANGED
@@ -76846,10 +76846,19 @@ function resolveDesktopEntryDisplayName(entryPath, fallbackName) {
76846
76846
  }
76847
76847
  return formatDesktopDisplayName(fallbackName);
76848
76848
  }
76849
- function resolveDesktopBootstrapSupportModulePath(moduleName, packageRoot = PACKAGE_ROOT) {
76849
+ function resolveDesktopBootstrapSupportModulePath(moduleName, packageRoot = PACKAGE_ROOT, options = {}) {
76850
+ const builtCandidates = options.preferredBuiltFormat === "cjs" ? [
76851
+ (0, import_node_path3.resolve)(packageRoot, "dist", `${moduleName}.cjs`),
76852
+ (0, import_node_path3.resolve)(packageRoot, "dist", `${moduleName}.js`),
76853
+ (0, import_node_path3.resolve)(packageRoot, "dist", `${moduleName}.mjs`)
76854
+ ] : [
76855
+ (0, import_node_path3.resolve)(packageRoot, "dist", `${moduleName}.mjs`),
76856
+ (0, import_node_path3.resolve)(packageRoot, "dist", `${moduleName}.js`),
76857
+ (0, import_node_path3.resolve)(packageRoot, "dist", `${moduleName}.cjs`)
76858
+ ];
76850
76859
  const candidates = [
76851
76860
  (0, import_node_path3.resolve)(packageRoot, "src", `${moduleName}.ts`),
76852
- (0, import_node_path3.resolve)(packageRoot, "dist", `${moduleName}.mjs`)
76861
+ ...builtCandidates
76853
76862
  ];
76854
76863
  for (const candidate of candidates) {
76855
76864
  if ((0, import_node_fs3.existsSync)(candidate)) {
@@ -76881,12 +76890,12 @@ function resolveDesktopBinaryOverridePath(configuredPath, envName, cwd = process
76881
76890
  }
76882
76891
  return (0, import_node_path3.resolve)(cwd, explicitPath);
76883
76892
  }
76884
- function createDesktopBootstrapEntry(entryPath, appName) {
76893
+ function createDesktopBootstrapEntry(entryPath, appName, options = {}) {
76885
76894
  const bootstrapId = (0, import_node_crypto3.randomUUID)();
76886
76895
  const bootstrapPath = (0, import_node_path3.join)((0, import_node_path3.dirname)(entryPath), `.elit-desktop-bootstrap-${appName}-${bootstrapId}.ts`);
76887
76896
  const preludePath = (0, import_node_path3.join)((0, import_node_path3.dirname)(entryPath), `.elit-desktop-prelude-${appName}-${bootstrapId}.ts`);
76888
- const desktopAutoRenderPath = resolveDesktopBootstrapSupportModulePath("desktop-auto-render");
76889
- const renderContextPath = resolveDesktopBootstrapSupportModulePath("render-context");
76897
+ const desktopAutoRenderPath = resolveDesktopBootstrapSupportModulePath("desktop-auto-render", PACKAGE_ROOT, options);
76898
+ const renderContextPath = resolveDesktopBootstrapSupportModulePath("render-context", PACKAGE_ROOT, options);
76890
76899
  const defaultTitle = `${resolveDesktopEntryDisplayName(entryPath, appName)} Desktop`;
76891
76900
  (0, import_node_fs3.writeFileSync)(
76892
76901
  preludePath,
@@ -76934,12 +76943,12 @@ function createDesktopBootstrapEntry(entryPath, appName) {
76934
76943
  cleanupPaths: [bootstrapPath, preludePath]
76935
76944
  };
76936
76945
  }
76937
- function createWorkspacePackagePlugin2(entryDir) {
76946
+ function createWorkspacePackagePlugin2(entryDir, options = {}) {
76938
76947
  return {
76939
76948
  name: "workspace-package-self-reference",
76940
76949
  setup(build2) {
76941
76950
  build2.onResolve({ filter: /^elit(?:\/.*)?$/ }, (args) => {
76942
- const resolved = resolveWorkspacePackageImport(args.path, args.resolveDir || entryDir);
76951
+ const resolved = resolveWorkspacePackageImport(args.path, args.resolveDir || entryDir, options);
76943
76952
  return resolved ? { path: resolved } : void 0;
76944
76953
  });
76945
76954
  }
@@ -77865,8 +77874,10 @@ async function prepareEntry(entry, runtime2, compiler, mode) {
77865
77874
  if (!shouldCompile) {
77866
77875
  return { appName, entryPath };
77867
77876
  }
77868
- const bootstrapEntry = createDesktopBootstrapEntry(entryPath, appName);
77869
77877
  const output = compileTarget(runtime2);
77878
+ const bootstrapEntry = createDesktopBootstrapEntry(entryPath, appName, {
77879
+ preferredBuiltFormat: compiler === "tsx" ? "esm" : "cjs"
77880
+ });
77870
77881
  const compiledPath = (0, import_node_path3.join)((0, import_node_path3.dirname)(entryPath), `.elit-desktop-${appName}-${(0, import_node_crypto3.randomUUID)()}${output.extension}`);
77871
77882
  try {
77872
77883
  await compileDesktopEntry({
@@ -77919,7 +77930,9 @@ async function compileDesktopEntry(options) {
77919
77930
  }
77920
77931
  }
77921
77932
  async function compileDesktopEntryWithEsbuild(options) {
77922
- const workspacePackagePlugin = createWorkspacePackagePlugin2((0, import_node_path3.dirname)(options.entryPath));
77933
+ const workspacePackagePlugin = createWorkspacePackagePlugin2((0, import_node_path3.dirname)(options.entryPath), {
77934
+ preferredBuiltFormat: "cjs"
77935
+ });
77923
77936
  await (0, import_esbuild2.build)({
77924
77937
  absWorkingDir: (0, import_node_path3.dirname)(options.entryPath),
77925
77938
  bundle: true,
@@ -77937,7 +77950,9 @@ async function compileDesktopEntryWithEsbuild(options) {
77937
77950
  async function compileDesktopEntryWithTsup(options) {
77938
77951
  const tsup = await loadOptionalDesktopCompiler("tsup", options.entryPath, "tsup");
77939
77952
  const outputBaseName = (0, import_node_path3.basename)(options.compiledPath, (0, import_node_path3.extname)(options.compiledPath));
77940
- const workspacePackagePlugin = createWorkspacePackagePlugin2((0, import_node_path3.dirname)(options.entryPath));
77953
+ const workspacePackagePlugin = createWorkspacePackagePlugin2((0, import_node_path3.dirname)(options.entryPath), {
77954
+ preferredBuiltFormat: "cjs"
77955
+ });
77941
77956
  await tsup.build({
77942
77957
  bundle: true,
77943
77958
  clean: false,
package/dist/cli.mjs CHANGED
@@ -76831,10 +76831,19 @@ function resolveDesktopEntryDisplayName(entryPath, fallbackName) {
76831
76831
  }
76832
76832
  return formatDesktopDisplayName(fallbackName);
76833
76833
  }
76834
- function resolveDesktopBootstrapSupportModulePath(moduleName, packageRoot = PACKAGE_ROOT) {
76834
+ function resolveDesktopBootstrapSupportModulePath(moduleName, packageRoot = PACKAGE_ROOT, options = {}) {
76835
+ const builtCandidates = options.preferredBuiltFormat === "cjs" ? [
76836
+ resolve4(packageRoot, "dist", `${moduleName}.cjs`),
76837
+ resolve4(packageRoot, "dist", `${moduleName}.js`),
76838
+ resolve4(packageRoot, "dist", `${moduleName}.mjs`)
76839
+ ] : [
76840
+ resolve4(packageRoot, "dist", `${moduleName}.mjs`),
76841
+ resolve4(packageRoot, "dist", `${moduleName}.js`),
76842
+ resolve4(packageRoot, "dist", `${moduleName}.cjs`)
76843
+ ];
76835
76844
  const candidates = [
76836
76845
  resolve4(packageRoot, "src", `${moduleName}.ts`),
76837
- resolve4(packageRoot, "dist", `${moduleName}.mjs`)
76846
+ ...builtCandidates
76838
76847
  ];
76839
76848
  for (const candidate of candidates) {
76840
76849
  if (existsSync3(candidate)) {
@@ -76866,12 +76875,12 @@ function resolveDesktopBinaryOverridePath(configuredPath, envName, cwd = process
76866
76875
  }
76867
76876
  return resolve4(cwd, explicitPath);
76868
76877
  }
76869
- function createDesktopBootstrapEntry(entryPath, appName) {
76878
+ function createDesktopBootstrapEntry(entryPath, appName, options = {}) {
76870
76879
  const bootstrapId = randomUUID2();
76871
76880
  const bootstrapPath = join3(dirname4(entryPath), `.elit-desktop-bootstrap-${appName}-${bootstrapId}.ts`);
76872
76881
  const preludePath = join3(dirname4(entryPath), `.elit-desktop-prelude-${appName}-${bootstrapId}.ts`);
76873
- const desktopAutoRenderPath = resolveDesktopBootstrapSupportModulePath("desktop-auto-render");
76874
- const renderContextPath = resolveDesktopBootstrapSupportModulePath("render-context");
76882
+ const desktopAutoRenderPath = resolveDesktopBootstrapSupportModulePath("desktop-auto-render", PACKAGE_ROOT, options);
76883
+ const renderContextPath = resolveDesktopBootstrapSupportModulePath("render-context", PACKAGE_ROOT, options);
76875
76884
  const defaultTitle = `${resolveDesktopEntryDisplayName(entryPath, appName)} Desktop`;
76876
76885
  writeFileSync4(
76877
76886
  preludePath,
@@ -76919,12 +76928,12 @@ function createDesktopBootstrapEntry(entryPath, appName) {
76919
76928
  cleanupPaths: [bootstrapPath, preludePath]
76920
76929
  };
76921
76930
  }
76922
- function createWorkspacePackagePlugin2(entryDir) {
76931
+ function createWorkspacePackagePlugin2(entryDir, options = {}) {
76923
76932
  return {
76924
76933
  name: "workspace-package-self-reference",
76925
76934
  setup(build2) {
76926
76935
  build2.onResolve({ filter: /^elit(?:\/.*)?$/ }, (args) => {
76927
- const resolved = resolveWorkspacePackageImport(args.path, args.resolveDir || entryDir);
76936
+ const resolved = resolveWorkspacePackageImport(args.path, args.resolveDir || entryDir, options);
76928
76937
  return resolved ? { path: resolved } : void 0;
76929
76938
  });
76930
76939
  }
@@ -77850,8 +77859,10 @@ async function prepareEntry(entry, runtime2, compiler, mode) {
77850
77859
  if (!shouldCompile) {
77851
77860
  return { appName, entryPath };
77852
77861
  }
77853
- const bootstrapEntry = createDesktopBootstrapEntry(entryPath, appName);
77854
77862
  const output = compileTarget(runtime2);
77863
+ const bootstrapEntry = createDesktopBootstrapEntry(entryPath, appName, {
77864
+ preferredBuiltFormat: compiler === "tsx" ? "esm" : "cjs"
77865
+ });
77855
77866
  const compiledPath = join3(dirname4(entryPath), `.elit-desktop-${appName}-${randomUUID2()}${output.extension}`);
77856
77867
  try {
77857
77868
  await compileDesktopEntry({
@@ -77904,7 +77915,9 @@ async function compileDesktopEntry(options) {
77904
77915
  }
77905
77916
  }
77906
77917
  async function compileDesktopEntryWithEsbuild(options) {
77907
- const workspacePackagePlugin = createWorkspacePackagePlugin2(dirname4(options.entryPath));
77918
+ const workspacePackagePlugin = createWorkspacePackagePlugin2(dirname4(options.entryPath), {
77919
+ preferredBuiltFormat: "cjs"
77920
+ });
77908
77921
  await esbuild2({
77909
77922
  absWorkingDir: dirname4(options.entryPath),
77910
77923
  bundle: true,
@@ -77922,7 +77935,9 @@ async function compileDesktopEntryWithEsbuild(options) {
77922
77935
  async function compileDesktopEntryWithTsup(options) {
77923
77936
  const tsup = await loadOptionalDesktopCompiler("tsup", options.entryPath, "tsup");
77924
77937
  const outputBaseName = basename4(options.compiledPath, extname3(options.compiledPath));
77925
- const workspacePackagePlugin = createWorkspacePackagePlugin2(dirname4(options.entryPath));
77938
+ const workspacePackagePlugin = createWorkspacePackagePlugin2(dirname4(options.entryPath), {
77939
+ preferredBuiltFormat: "cjs"
77940
+ });
77926
77941
  await tsup.build({
77927
77942
  bundle: true,
77928
77943
  clean: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "elit",
3
- "version": "3.6.1",
3
+ "version": "3.6.2",
4
4
  "description": "Optimized lightweight library for creating DOM elements with reactive state",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",