@belov.ai/yellowcode 0.0.0-stage → 0.1.0-alpha.30

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
@@ -1,3 +1,13 @@
1
- # Temporary Holding Version
1
+ # Yellowcode
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Командная строка Yellowcode: конфигурации и файловые базы 1С без платформы — метаданные, модули, запросы,
4
+ выгрузка в JSON, преобразование CF, DT, 1CD и BAK. Удобна для ИИ-агентов и CI.
5
+
6
+ ```sh
7
+ npx @belov.ai/yellowcode --help
8
+ npx @belov.ai/yellowcode config metadata tree base.cf --depth 1
9
+ npm install -g @belov.ai/yellowcode # команда yellowcode
10
+ ```
11
+
12
+ Платформы: Linux x64 и arm64 (glibc 2.36+), macOS Apple Silicon, Windows x64. npm сам ставит бинарник своей
13
+ платформы. Окно приложения и другие способы установки — https://yellowcode.dev.
@@ -0,0 +1,60 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ // Runs the Yellowcode console binary of this platform with the same arguments and exit code.
4
+ const { spawnSync } = require("node:child_process");
5
+ const fs = require("node:fs");
6
+
7
+ const PACKAGES = {
8
+ "darwin-arm64": {
9
+ "name": "@belov.ai/yellowcode-darwin-arm64",
10
+ "exe": "yellowcode"
11
+ },
12
+ "linux-arm64": {
13
+ "name": "@belov.ai/yellowcode-linux-arm64",
14
+ "exe": "yellowcode"
15
+ },
16
+ "linux-x64": {
17
+ "name": "@belov.ai/yellowcode-linux-x64",
18
+ "exe": "yellowcode"
19
+ },
20
+ "win32-x64": {
21
+ "name": "@belov.ai/yellowcode-win32-x64",
22
+ "exe": "yellowcode.exe"
23
+ }
24
+ };
25
+
26
+ function fail(message) {
27
+ process.stderr.write(`yellowcode: ${message}\n`);
28
+ process.exit(1);
29
+ }
30
+
31
+ function binary() {
32
+ if (process.env.YELLOWCODE_BINARY) return process.env.YELLOWCODE_BINARY;
33
+ const key = `${process.platform}-${process.arch}`;
34
+ const entry = PACKAGES[key];
35
+ if (!entry) {
36
+ fail(`платформа ${key} не поддерживается; есть: ${Object.keys(PACKAGES).join(", ")}`);
37
+ }
38
+ if (process.platform === "linux") {
39
+ const report = process.report && process.report.getReport();
40
+ if (report && report.header && !report.header.glibcVersionRuntime) {
41
+ fail("нужен Linux с glibc 2.36 или новее; musl (Alpine) не поддерживается");
42
+ }
43
+ }
44
+ try {
45
+ return require.resolve(`${entry.name}/bin/${entry.exe}`);
46
+ } catch {
47
+ fail(`не установлен пакет ${entry.name} для ${key}; переустановите без --omit=optional и --no-optional`);
48
+ }
49
+ }
50
+
51
+ const exe = binary();
52
+ try {
53
+ fs.accessSync(exe, fs.constants.X_OK);
54
+ } catch {
55
+ try { fs.chmodSync(exe, 0o755); } catch {}
56
+ }
57
+ const result = spawnSync(exe, process.argv.slice(2), { stdio: "inherit" });
58
+ if (result.error) fail(`не удалось запустить ${exe}: ${result.error.message}`);
59
+ if (result.signal) process.kill(process.pid, result.signal);
60
+ process.exit(result.status === null ? 1 : result.status);
package/package.json CHANGED
@@ -1,6 +1,34 @@
1
1
  {
2
2
  "name": "@belov.ai/yellowcode",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.0-alpha.30",
4
+ "description": "Yellowcode CLI: 1C configurations and file databases without the 1C platform",
5
+ "keywords": [
6
+ "1c",
7
+ "1c-enterprise",
8
+ "bsl",
9
+ "cli",
10
+ "ai-agents"
11
+ ],
12
+ "homepage": "https://yellowcode.dev",
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "git+https://github.com/belov38/yellowcode.git"
16
+ },
17
+ "license": "MIT OR Apache-2.0",
18
+ "bin": {
19
+ "yellowcode": "bin/yellowcode.js"
20
+ },
21
+ "files": [
22
+ "bin",
23
+ "README.md"
24
+ ],
25
+ "engines": {
26
+ "node": ">=18"
27
+ },
28
+ "optionalDependencies": {
29
+ "@belov.ai/yellowcode-darwin-arm64": "0.1.0-alpha.30",
30
+ "@belov.ai/yellowcode-linux-arm64": "0.1.0-alpha.30",
31
+ "@belov.ai/yellowcode-linux-x64": "0.1.0-alpha.30",
32
+ "@belov.ai/yellowcode-win32-x64": "0.1.0-alpha.30"
33
+ }
34
+ }