Skip to content

Commit a50315f

Browse files
committed
update
1 parent a24294f commit a50315f

File tree

5 files changed

+32
-26
lines changed

5 files changed

+32
-26
lines changed

packages/cli/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"pack": "pnpm pack"
3030
},
3131
"dependencies": {
32+
"@paralleldrive/cuid2": "^2.2.2",
3233
"@zenstackhq/common-helpers": "workspace:*",
3334
"@zenstackhq/language": "workspace:*",
3435
"@zenstackhq/sdk": "workspace:*",

packages/cli/src/actions/generate.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ import { schema } from '${outputPath}/schema';
3939
const client = new ZenStackClient(schema, {
4040
dialect: { ... }
4141
});
42-
\`\`\``);
42+
\`\`\`
43+
44+
Check documentation: https://zenstack.dev/docs/3.x`);
4345
}
4446
}
4547

packages/cli/src/utils/is-container.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@ let cachedResult: boolean | undefined;
55

66
// Podman detection
77
const hasContainerEnv = () => {
8-
try {
9-
fs.statSync('/run/.containerenv');
10-
return true;
11-
} catch {
12-
return false;
13-
}
8+
try {
9+
fs.statSync('/run/.containerenv');
10+
return true;
11+
} catch {
12+
return false;
13+
}
1414
};
1515

1616
export function isInContainer() {
17-
// TODO: Use `??=` when targeting Node.js 16.
18-
if (cachedResult === undefined) {
19-
cachedResult = hasContainerEnv() || isDocker();
20-
}
17+
// TODO: Use `??=` when targeting Node.js 16.
18+
if (cachedResult === undefined) {
19+
cachedResult = hasContainerEnv() || isDocker();
20+
}
2121

22-
return cachedResult;
23-
}
22+
return cachedResult;
23+
}

packages/cli/src/utils/is-wsl.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@ import process from 'node:process';
22
import os from 'node:os';
33
import fs from 'node:fs';
44
export const isWsl = () => {
5-
if (process.platform !== 'linux') {
6-
return false;
7-
}
8-
9-
if (os.release().toLowerCase().includes('microsoft')) {
10-
return true;
11-
}
5+
if (process.platform !== 'linux') {
6+
return false;
7+
}
128

13-
try {
14-
return fs.readFileSync('/proc/version', 'utf8').toLowerCase().includes('microsoft');
15-
} catch {
16-
return false;
17-
}
18-
};
9+
if (os.release().toLowerCase().includes('microsoft')) {
10+
return true;
11+
}
12+
13+
try {
14+
return fs.readFileSync('/proc/version', 'utf8').toLowerCase().includes('microsoft');
15+
} catch {
16+
return false;
17+
}
18+
};

pnpm-lock.yaml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)