@dexlyai/dexly 0.1.0 → 0.1.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/README.md CHANGED
@@ -28,16 +28,34 @@ dexly install
28
28
  npx -y @dexlyai/dexly upgrade
29
29
  ```
30
30
 
31
- ## Local Development
31
+ ## Publish
32
32
 
33
- From the Dexly workspace, developers can use these shell entrypoints:
33
+ From the companion repo:
34
34
 
35
35
  ```bash
36
- bash ../DexlyProtocol/scripts/build-protocol.sh
37
- bash scripts/dev-watch-and-install.sh
38
- bash scripts/build-production.sh
36
+ npm run release:set-version -- 0.1.1
37
+ npm run publish:npm:latest
39
38
  ```
40
39
 
40
+ Other channels:
41
+
42
+ ```bash
43
+ npm run publish:npm:beta
44
+ npm run publish:npm:canary
45
+ ```
46
+
47
+ Release policy and the publishable companion version are maintained from one manifest:
48
+
49
+ - [`release/companion-release.json`](/Users/pmishra/Prashant/Workspace/DexlyWorkspace/DexlyCompanion/release/companion-release.json)
50
+
51
+ Sync derived files without changing the version:
52
+
53
+ ```bash
54
+ npm run release:sync
55
+ ```
56
+
57
+ `npm run release:set-version -- <semver>` updates the manifest version and syncs the derived files. Review `minimumVersion` and `recommendedVersion` in the same manifest before publishing if the rollout policy should change with that release.
58
+
41
59
  ## Commands
42
60
 
43
61
  - `install`: install or repair the companion, launcher, and Chrome native-host manifest
package/dist/cli.js CHANGED
@@ -1,5 +1,4 @@
1
1
  #!/usr/bin/env node
2
- #!/usr/bin/env node
3
2
  "use strict";
4
3
  var __create = Object.create;
5
4
  var __defProp = Object.defineProperty;
@@ -132,7 +131,7 @@ var import_companion2 = __toESM(require_companion());
132
131
  var import_node_os = __toESM(require("node:os"));
133
132
  var import_node_path = __toESM(require("node:path"));
134
133
  var import_companion = __toESM(require_companion());
135
- var DEXLY_COMPANION_VERSION = true ? "0.1.0" : packageJson.version;
134
+ var DEXLY_COMPANION_VERSION = true ? "0.1.2" : packageJson.version;
136
135
  var DEXLY_COMPANION_DESCRIPTION = "Dexly native bridge for Codex";
137
136
  var DEXLY_COMPANION_METADATA_FILE_NAME = "install-metadata.json";
138
137
  function defaultInstallRoot(homeDir = import_node_os.default.homedir()) {
@@ -596,7 +595,8 @@ async function installCompanion(options) {
596
595
  const toolPaths = options.toolPaths ?? detectToolPaths();
597
596
  const sourceDistDir = import_node_path3.default.join(options.sourcePackageDir, "dist");
598
597
  const sourcePackageJsonPath = import_node_path3.default.join(options.sourcePackageDir, "package.json");
599
- const versionRoot = versionInstallPath(installRoot, DEXLY_COMPANION_VERSION);
598
+ const installVersion = await readInstallPackageVersion(sourcePackageJsonPath);
599
+ const versionRoot = versionInstallPath(installRoot, installVersion);
600
600
  const stagingVersionRoot = `${versionRoot}.tmp-${Date.now()}-${Math.random().toString(16).slice(2)}`;
601
601
  await (0, import_promises3.mkdir)(versionStorePath(installRoot), { recursive: true });
602
602
  await (0, import_promises3.rm)(stagingVersionRoot, { recursive: true, force: true });
@@ -623,7 +623,7 @@ async function installCompanion(options) {
623
623
  await (0, import_promises3.rm)(stagingVersionRoot, { recursive: true, force: true }).catch(() => void 0);
624
624
  throw error;
625
625
  }
626
- await activateInstalledVersion(installRoot, DEXLY_COMPANION_VERSION);
626
+ await activateInstalledVersion(installRoot, installVersion);
627
627
  await rewriteCurrentLauncher(installRoot, toolPaths);
628
628
  await ensureChromeHostManifest(installRoot, manifestDir);
629
629
  const existingMetadata = await loadInstallMetadata(installRoot);
@@ -632,11 +632,11 @@ async function installCompanion(options) {
632
632
  schemaVersion: 1,
633
633
  packageName: "@dexlyai/dexly",
634
634
  executableName: "dexly",
635
- currentVersion: DEXLY_COMPANION_VERSION,
636
- previousVersion: existingMetadata && existingMetadata.currentVersion !== DEXLY_COMPANION_VERSION ? existingMetadata.currentVersion : existingMetadata?.previousVersion ?? null,
635
+ currentVersion: installVersion,
636
+ previousVersion: existingMetadata && existingMetadata.currentVersion !== installVersion ? existingMetadata.currentVersion : existingMetadata?.previousVersion ?? null,
637
637
  knownGoodVersions: [
638
- DEXLY_COMPANION_VERSION,
639
- ...(existingMetadata?.knownGoodVersions ?? []).filter((version) => version !== DEXLY_COMPANION_VERSION)
638
+ installVersion,
639
+ ...(existingMetadata?.knownGoodVersions ?? []).filter((version) => version !== installVersion)
640
640
  ].slice(0, 2),
641
641
  currentChannel: options.channel ?? existingMetadata?.currentChannel ?? null,
642
642
  installedAt: existingMetadata?.installedAt ?? now,
@@ -650,7 +650,7 @@ async function installCompanion(options) {
650
650
  manifestPath,
651
651
  hostPath,
652
652
  allowedOrigins,
653
- version: DEXLY_COMPANION_VERSION,
653
+ version: installVersion,
654
654
  metadataPath: import_node_path3.default.join(installRoot, "install-metadata.json")
655
655
  };
656
656
  }
@@ -721,6 +721,13 @@ async function assertInstallablePackageExists(sourcePackageDir) {
721
721
  }
722
722
  }
723
723
  }
724
+ async function readInstallPackageVersion(packageJsonPath) {
725
+ const packageJson = JSON.parse(await (0, import_promises3.readFile)(packageJsonPath, "utf8"));
726
+ if (typeof packageJson.version !== "string" || packageJson.version.trim().length === 0) {
727
+ throw new Error(`Dexly Companion package metadata is missing a valid version in ${packageJsonPath}.`);
728
+ }
729
+ return packageJson.version.trim();
730
+ }
724
731
  function renderHostLauncher(options) {
725
732
  const pathEntries = [
726
733
  import_node_path3.default.dirname(options.nodePath),
package/dist/host.js CHANGED
@@ -1,5 +1,4 @@
1
1
  #!/usr/bin/env node
2
- #!/usr/bin/env node
3
2
  "use strict";
4
3
  var __create = Object.create;
5
4
  var __defProp = Object.defineProperty;
@@ -133,7 +132,7 @@ var import_companion4 = __toESM(require_companion());
133
132
  var import_node_os = __toESM(require("node:os"));
134
133
  var import_node_path = __toESM(require("node:path"));
135
134
  var import_companion = __toESM(require_companion());
136
- var DEXLY_COMPANION_VERSION = true ? "0.1.0" : packageJson.version;
135
+ var DEXLY_COMPANION_VERSION = true ? "0.1.2" : packageJson.version;
137
136
  var DEXLY_COMPANION_DESCRIPTION = "Dexly native bridge for Codex";
138
137
  var DEXLY_COMPANION_METADATA_FILE_NAME = "install-metadata.json";
139
138
  function defaultInstallRoot(homeDir = import_node_os.default.homedir()) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dexlyai/dexly",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "type": "commonjs",
5
5
  "bin": {
6
6
  "dexly": "dist/cli.js"
@@ -13,22 +13,29 @@
13
13
  },
14
14
  "scripts": {
15
15
  "dexly": "npm run dexly:dev",
16
- "dexly:dev": "bash scripts/dev-watch-and-install.sh",
17
- "build:production": "bash scripts/build-production.sh",
16
+ "dexly:dev": "bash scripts/dev-live-build-and-install.sh",
17
+ "build:production": "bash scripts/production-build.sh",
18
18
  "clean": "node scripts/clean-dist.mjs",
19
+ "release:sync": "node scripts/sync-release-config.mjs",
20
+ "release:check": "node scripts/sync-release-config.mjs --check",
21
+ "release:set-version": "node scripts/set-release-version.mjs",
19
22
  "protocol:build": "npm --prefix ../DexlyProtocol run build",
20
- "build": "npm run clean && npm run protocol:build && tsc -p tsconfig.json --noEmit && node scripts/build-bundles.mjs",
23
+ "build": "npm run release:sync && npm run clean && npm run protocol:build && tsc -p tsconfig.json --noEmit && node scripts/build-bundles.mjs",
21
24
  "test": "vitest run tests",
22
25
  "dexly:build": "npm run build",
23
26
  "dexly:test": "npm run test",
24
27
  "dexly:install": "npm run build && npm run install-host",
25
28
  "dexly:doctor": "npm run build && npm run doctor",
29
+ "publish:npm": "bash scripts/production-npm-publish.sh",
30
+ "publish:npm:latest": "bash scripts/production-npm-publish.sh latest",
31
+ "publish:npm:beta": "bash scripts/production-npm-publish.sh beta",
32
+ "publish:npm:canary": "bash scripts/production-npm-publish.sh canary",
26
33
  "host": "node dist/cli.js host",
27
34
  "install-host": "node dist/cli.js install",
28
35
  "doctor": "node dist/cli.js doctor",
29
36
  "version:print": "node dist/cli.js version",
30
37
  "check:imports": "node scripts/check-no-cross-repo-imports.mjs",
31
- "prepack": "npm run build && npm run test && npm run check:imports"
38
+ "prepack": "npm run build && npm run test && npm run check:imports && npm run release:check"
32
39
  },
33
40
  "publishConfig": {
34
41
  "access": "public"