@atolis-hq/wake 0.4.10 → 0.4.12
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.
|
@@ -4,15 +4,20 @@ import { dirname, resolve } from 'node:path';
|
|
|
4
4
|
import { fileURLToPath } from 'node:url';
|
|
5
5
|
const defaultRepoRoot = resolve(dirname(fileURLToPath(import.meta.url)), '..', '..');
|
|
6
6
|
function packageVersion(repoRoot) {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
7
|
+
for (const candidate of [
|
|
8
|
+
resolve(repoRoot, 'package.json'),
|
|
9
|
+
resolve(repoRoot, '..', 'package.json'),
|
|
10
|
+
]) {
|
|
11
|
+
try {
|
|
12
|
+
const manifest = JSON.parse(readFileSync(candidate, 'utf8'));
|
|
13
|
+
if (typeof manifest.version === 'string' && manifest.version.length > 0)
|
|
14
|
+
return manifest.version;
|
|
15
|
+
}
|
|
16
|
+
catch {
|
|
17
|
+
// Source and compiled layouts place the package manifest at different depths.
|
|
18
|
+
}
|
|
15
19
|
}
|
|
20
|
+
return undefined;
|
|
16
21
|
}
|
|
17
22
|
function gitOutputFromRoot(repoRoot, args) {
|
|
18
23
|
try {
|
|
@@ -119,6 +124,6 @@ export function resolveWakeVersion(options = {}) {
|
|
|
119
124
|
return `g${headHash.slice(0, 7)}`;
|
|
120
125
|
return '0.1.0-dev';
|
|
121
126
|
}
|
|
122
|
-
export const wakeVersion = "
|
|
127
|
+
export const wakeVersion = "v0.4.12";
|
|
123
128
|
/** The registry-installable version used by packaged sandbox images. */
|
|
124
129
|
export const wakePackageVersion = packageVersion(defaultRepoRoot) ?? wakeVersion;
|