@yahoo/uds-create-cli 5.67.0 → 5.67.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/package.json +11 -9
- package/platforms.cjs +38 -10
- package/subprocess/transform-runner.mjs +1 -1
- package/uds.js +14 -14
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yahoo/uds-create-cli",
|
|
3
|
-
"version": "5.67.
|
|
3
|
+
"version": "5.67.2",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
"@modelcontextprotocol/sdk": "^1.32.2",
|
|
32
32
|
"@orpc/client": "^1.13.9",
|
|
33
33
|
"@orpc/contract": "^1.13.9",
|
|
34
|
-
"@yahoo/uds-create-config": "5.67.
|
|
35
|
-
"@yahoo/uds-create-loader": "5.67.
|
|
36
|
-
"@yahoo/uds-create-types": "5.67.
|
|
37
|
-
"@yahoo/uds-create-utils": "5.67.
|
|
34
|
+
"@yahoo/uds-create-config": "5.67.2",
|
|
35
|
+
"@yahoo/uds-create-loader": "5.67.2",
|
|
36
|
+
"@yahoo/uds-create-types": "5.67.2",
|
|
37
|
+
"@yahoo/uds-create-utils": "5.67.2",
|
|
38
38
|
"esbuild": "^0.27.4",
|
|
39
39
|
"ts-morph": "^27.0.2",
|
|
40
40
|
"get-tsconfig": "^4.10.0",
|
|
@@ -53,9 +53,11 @@
|
|
|
53
53
|
},
|
|
54
54
|
"udsSchemaVersion": 20261030163028,
|
|
55
55
|
"optionalDependencies": {
|
|
56
|
-
"@yahoo/uds-create-cli-darwin-arm64": "5.67.
|
|
57
|
-
"@yahoo/uds-create-cli-darwin-x64": "5.67.
|
|
58
|
-
"@yahoo/uds-create-cli-linux-arm64": "5.67.
|
|
59
|
-
"@yahoo/uds-create-cli-linux-x64": "5.67.
|
|
56
|
+
"@yahoo/uds-create-cli-darwin-arm64": "5.67.2",
|
|
57
|
+
"@yahoo/uds-create-cli-darwin-x64": "5.67.2",
|
|
58
|
+
"@yahoo/uds-create-cli-linux-arm64": "5.67.2",
|
|
59
|
+
"@yahoo/uds-create-cli-linux-x64": "5.67.2",
|
|
60
|
+
"@yahoo/uds-create-cli-linux-arm64-musl": "5.67.2",
|
|
61
|
+
"@yahoo/uds-create-cli-linux-x64-musl": "5.67.2"
|
|
60
62
|
}
|
|
61
63
|
}
|
package/platforms.cjs
CHANGED
|
@@ -1,15 +1,43 @@
|
|
|
1
1
|
// Shared by the compiler, release packager and installed launcher. Platform packages contain
|
|
2
2
|
// only the executable; subprocess helpers stay with the launcher at UDS_CLI_ROOT.
|
|
3
|
+
const { arch, platform } = require('node:os');
|
|
4
|
+
|
|
5
|
+
// Every Linux entry names its libc, so a package manager that reads `libc` installs one Linux
|
|
6
|
+
// package. The glibc builds can't start on a musl Linux such as Alpine.
|
|
3
7
|
const CLI_PLATFORMS = [
|
|
4
8
|
{ os: 'darwin', cpu: 'arm64' },
|
|
5
9
|
{ os: 'darwin', cpu: 'x64' },
|
|
6
|
-
{ os: 'linux', cpu: 'arm64' },
|
|
7
|
-
{ os: 'linux', cpu: 'x64' },
|
|
8
|
-
|
|
9
|
-
os,
|
|
10
|
-
|
|
11
|
-
target: `${os}-${cpu}
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
{ os: 'linux', cpu: 'arm64', libc: 'glibc' },
|
|
11
|
+
{ os: 'linux', cpu: 'x64', libc: 'glibc' },
|
|
12
|
+
{ os: 'linux', cpu: 'arm64', libc: 'musl' },
|
|
13
|
+
{ os: 'linux', cpu: 'x64', libc: 'musl' },
|
|
14
|
+
].map(({ os, cpu, libc }) => {
|
|
15
|
+
const target = libc === 'musl' ? `${os}-${cpu}-musl` : `${os}-${cpu}`;
|
|
16
|
+
|
|
17
|
+
return { os, cpu, libc, target, name: `@yahoo/uds-create-cli-${target}` };
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
/** The runtime's libc. A glibc build's process report names its glibc version, and a musl
|
|
21
|
+
* build's has none. `excludeNetwork` keeps Node from listing the host's interfaces and making
|
|
22
|
+
* reverse DNS queries for the report; Bun ignores it. */
|
|
23
|
+
function runtimeLibc() {
|
|
24
|
+
process.report.excludeNetwork = true;
|
|
25
|
+
|
|
26
|
+
return process.report.getReport().header.glibcVersionRuntime
|
|
27
|
+
? 'glibc'
|
|
28
|
+
: 'musl';
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/** The catalog entry for this host, or `undefined` when no package is published for it. Yarn
|
|
32
|
+
* Classic, and `npm ci` from a lockfile written before npm 11.11, install both Linux builds, so the
|
|
33
|
+
* choice is made here. */
|
|
34
|
+
function hostPlatform() {
|
|
35
|
+
const os = platform();
|
|
36
|
+
const libc = os === 'linux' ? runtimeLibc() : undefined;
|
|
37
|
+
|
|
38
|
+
return CLI_PLATFORMS.find(
|
|
39
|
+
(entry) => entry.os === os && entry.cpu === arch() && entry.libc === libc,
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
module.exports = { CLI_PLATFORMS, hostPlatform };
|
|
@@ -70760,7 +70760,7 @@ var cssFields = external_exports.strictObject({
|
|
|
70760
70760
|
/** The files the app's stylesheet is shaken against, as globs from the config's directory. */
|
|
70761
70761
|
content: external_exports.array(external_exports.string().min(1)).meta({
|
|
70762
70762
|
title: "Content",
|
|
70763
|
-
description: `The files the build reads for the classes an app uses, as globs relative to the config's directory: \`src/**/*.{ts,tsx}\`, \`app/**/*.tsx\`, or a prebuilt package's output such as \`node_modules/@acme/widgets/dist/**/*.{js,mjs}\`. \`.ts\`, \`.tsx\`, \`.mts\`, \`.cts\`, \`.js\`, \`.jsx\`, \`.mjs\` and \`.cjs\` files are read for the components they render, compiled JSX included, and every file a glob names \u2014 \`.html\`, \`.vue\`, \`.md\` and the rest \u2014 for the classes its text spells, as in \`class="md:flex"\`. Set, it replaces the default. Unset, \`${CSS_DEFAULTS.content[0]}\`.`,
|
|
70763
|
+
description: `The files the build reads for the classes an app uses, as globs relative to the config's directory: \`src/**/*.{ts,tsx}\`, \`app/**/*.tsx\`, or a prebuilt package's output such as \`node_modules/@acme/widgets/dist/**/*.{js,mjs}\`. \`.ts\`, \`.tsx\`, \`.mts\`, \`.cts\`, \`.js\`, \`.jsx\`, \`.mjs\` and \`.cjs\` files are read for the components they render, compiled JSX included, and every file a glob names \u2014 \`.html\`, \`.vue\`, \`.md\`, \`.css\`, \`.scss\` and the rest \u2014 for the classes its text spells, as in \`class="md:flex"\`, and the variables it reads, as in \`var(--uds-spacing-2)\`. Set, it replaces the default. Unset, \`${CSS_DEFAULTS.content[0]}\`.`,
|
|
70764
70764
|
default: [...CSS_DEFAULTS.content]
|
|
70765
70765
|
}).optional(),
|
|
70766
70766
|
/** What the stylesheet keeps whether or not a scanned file uses it — for a value built at runtime,
|
package/uds.js
CHANGED
|
@@ -9,16 +9,20 @@ import platforms from './platforms.cjs';
|
|
|
9
9
|
|
|
10
10
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
11
11
|
const src = join(__dirname, 'src', 'index.ts');
|
|
12
|
-
const bin = join(__dirname, 'bin', `uds-${platform()}-${arch()}`);
|
|
13
12
|
|
|
14
|
-
/**
|
|
15
|
-
function
|
|
16
|
-
const target = platforms.
|
|
17
|
-
(entry) => entry.os === platform() && entry.cpu === arch(),
|
|
18
|
-
);
|
|
13
|
+
/** The executable for this host: a local build in `bin/`, or else the installed platform package. */
|
|
14
|
+
function hostBinary() {
|
|
15
|
+
const target = platforms.hostPlatform();
|
|
19
16
|
|
|
20
17
|
if (!target) throw new Error(`Unsupported platform: ${platform()}-${arch()}`);
|
|
21
18
|
|
|
19
|
+
const bin = join(__dirname, 'bin', `uds-${target.target}`);
|
|
20
|
+
|
|
21
|
+
return existsSync(bin) ? bin : installedBinary(target);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/** Resolve relative to this launcher, so hoisted or nested installs select their own release. */
|
|
25
|
+
function installedBinary(target) {
|
|
22
26
|
const ownPackage = join(__dirname, 'package.json');
|
|
23
27
|
const { version } = JSON.parse(readFileSync(ownPackage, 'utf8'));
|
|
24
28
|
let manifest;
|
|
@@ -105,14 +109,10 @@ try {
|
|
|
105
109
|
env,
|
|
106
110
|
});
|
|
107
111
|
} else {
|
|
108
|
-
execFileSync(
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
stdio: 'inherit',
|
|
113
|
-
env,
|
|
114
|
-
},
|
|
115
|
-
);
|
|
112
|
+
execFileSync(hostBinary(), process.argv.slice(2), {
|
|
113
|
+
stdio: 'inherit',
|
|
114
|
+
env,
|
|
115
|
+
});
|
|
116
116
|
}
|
|
117
117
|
} catch (e) {
|
|
118
118
|
if (e.status == null) console.error(e.message);
|