@dexlyai/dexly 0.1.0 → 0.1.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.
- package/README.md +23 -5
- package/dist/cli.js +16 -8
- package/dist/host.js +1 -1
- package/package.json +12 -5
package/README.md
CHANGED
|
@@ -28,16 +28,34 @@ dexly install
|
|
|
28
28
|
npx -y @dexlyai/dexly upgrade
|
|
29
29
|
```
|
|
30
30
|
|
|
31
|
-
##
|
|
31
|
+
## Publish
|
|
32
32
|
|
|
33
|
-
From the
|
|
33
|
+
From the companion repo:
|
|
34
34
|
|
|
35
35
|
```bash
|
|
36
|
-
|
|
37
|
-
|
|
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
|
@@ -132,7 +132,7 @@ var import_companion2 = __toESM(require_companion());
|
|
|
132
132
|
var import_node_os = __toESM(require("node:os"));
|
|
133
133
|
var import_node_path = __toESM(require("node:path"));
|
|
134
134
|
var import_companion = __toESM(require_companion());
|
|
135
|
-
var DEXLY_COMPANION_VERSION = true ? "0.1.
|
|
135
|
+
var DEXLY_COMPANION_VERSION = true ? "0.1.1" : packageJson.version;
|
|
136
136
|
var DEXLY_COMPANION_DESCRIPTION = "Dexly native bridge for Codex";
|
|
137
137
|
var DEXLY_COMPANION_METADATA_FILE_NAME = "install-metadata.json";
|
|
138
138
|
function defaultInstallRoot(homeDir = import_node_os.default.homedir()) {
|
|
@@ -596,7 +596,8 @@ async function installCompanion(options) {
|
|
|
596
596
|
const toolPaths = options.toolPaths ?? detectToolPaths();
|
|
597
597
|
const sourceDistDir = import_node_path3.default.join(options.sourcePackageDir, "dist");
|
|
598
598
|
const sourcePackageJsonPath = import_node_path3.default.join(options.sourcePackageDir, "package.json");
|
|
599
|
-
const
|
|
599
|
+
const installVersion = await readInstallPackageVersion(sourcePackageJsonPath);
|
|
600
|
+
const versionRoot = versionInstallPath(installRoot, installVersion);
|
|
600
601
|
const stagingVersionRoot = `${versionRoot}.tmp-${Date.now()}-${Math.random().toString(16).slice(2)}`;
|
|
601
602
|
await (0, import_promises3.mkdir)(versionStorePath(installRoot), { recursive: true });
|
|
602
603
|
await (0, import_promises3.rm)(stagingVersionRoot, { recursive: true, force: true });
|
|
@@ -623,7 +624,7 @@ async function installCompanion(options) {
|
|
|
623
624
|
await (0, import_promises3.rm)(stagingVersionRoot, { recursive: true, force: true }).catch(() => void 0);
|
|
624
625
|
throw error;
|
|
625
626
|
}
|
|
626
|
-
await activateInstalledVersion(installRoot,
|
|
627
|
+
await activateInstalledVersion(installRoot, installVersion);
|
|
627
628
|
await rewriteCurrentLauncher(installRoot, toolPaths);
|
|
628
629
|
await ensureChromeHostManifest(installRoot, manifestDir);
|
|
629
630
|
const existingMetadata = await loadInstallMetadata(installRoot);
|
|
@@ -632,11 +633,11 @@ async function installCompanion(options) {
|
|
|
632
633
|
schemaVersion: 1,
|
|
633
634
|
packageName: "@dexlyai/dexly",
|
|
634
635
|
executableName: "dexly",
|
|
635
|
-
currentVersion:
|
|
636
|
-
previousVersion: existingMetadata && existingMetadata.currentVersion !==
|
|
636
|
+
currentVersion: installVersion,
|
|
637
|
+
previousVersion: existingMetadata && existingMetadata.currentVersion !== installVersion ? existingMetadata.currentVersion : existingMetadata?.previousVersion ?? null,
|
|
637
638
|
knownGoodVersions: [
|
|
638
|
-
|
|
639
|
-
...(existingMetadata?.knownGoodVersions ?? []).filter((version) => version !==
|
|
639
|
+
installVersion,
|
|
640
|
+
...(existingMetadata?.knownGoodVersions ?? []).filter((version) => version !== installVersion)
|
|
640
641
|
].slice(0, 2),
|
|
641
642
|
currentChannel: options.channel ?? existingMetadata?.currentChannel ?? null,
|
|
642
643
|
installedAt: existingMetadata?.installedAt ?? now,
|
|
@@ -650,7 +651,7 @@ async function installCompanion(options) {
|
|
|
650
651
|
manifestPath,
|
|
651
652
|
hostPath,
|
|
652
653
|
allowedOrigins,
|
|
653
|
-
version:
|
|
654
|
+
version: installVersion,
|
|
654
655
|
metadataPath: import_node_path3.default.join(installRoot, "install-metadata.json")
|
|
655
656
|
};
|
|
656
657
|
}
|
|
@@ -721,6 +722,13 @@ async function assertInstallablePackageExists(sourcePackageDir) {
|
|
|
721
722
|
}
|
|
722
723
|
}
|
|
723
724
|
}
|
|
725
|
+
async function readInstallPackageVersion(packageJsonPath) {
|
|
726
|
+
const packageJson = JSON.parse(await (0, import_promises3.readFile)(packageJsonPath, "utf8"));
|
|
727
|
+
if (typeof packageJson.version !== "string" || packageJson.version.trim().length === 0) {
|
|
728
|
+
throw new Error(`Dexly Companion package metadata is missing a valid version in ${packageJsonPath}.`);
|
|
729
|
+
}
|
|
730
|
+
return packageJson.version.trim();
|
|
731
|
+
}
|
|
724
732
|
function renderHostLauncher(options) {
|
|
725
733
|
const pathEntries = [
|
|
726
734
|
import_node_path3.default.dirname(options.nodePath),
|
package/dist/host.js
CHANGED
|
@@ -133,7 +133,7 @@ var import_companion4 = __toESM(require_companion());
|
|
|
133
133
|
var import_node_os = __toESM(require("node:os"));
|
|
134
134
|
var import_node_path = __toESM(require("node:path"));
|
|
135
135
|
var import_companion = __toESM(require_companion());
|
|
136
|
-
var DEXLY_COMPANION_VERSION = true ? "0.1.
|
|
136
|
+
var DEXLY_COMPANION_VERSION = true ? "0.1.1" : packageJson.version;
|
|
137
137
|
var DEXLY_COMPANION_DESCRIPTION = "Dexly native bridge for Codex";
|
|
138
138
|
var DEXLY_COMPANION_METADATA_FILE_NAME = "install-metadata.json";
|
|
139
139
|
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.
|
|
3
|
+
"version": "0.1.1",
|
|
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-
|
|
17
|
-
"build:production": "bash scripts/build
|
|
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"
|