@enter-pro/enter-code 0.0.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.
Files changed (2) hide show
  1. package/bin/enter +50 -0
  2. package/package.json +19 -0
package/bin/enter ADDED
@@ -0,0 +1,50 @@
1
+ #!/usr/bin/env node
2
+
3
+ "use strict";
4
+
5
+ const { execFileSync } = require("child_process");
6
+ const path = require("path");
7
+
8
+ const PLATFORM_MAP = {
9
+ "darwin-arm64": "@enter-pro/enter-code-darwin-arm64",
10
+ "darwin-x64": "@enter-pro/enter-code-darwin-x64",
11
+ "linux-arm64": "@enter-pro/enter-code-linux-arm64",
12
+ "linux-x64": "@enter-pro/enter-code-linux-x64",
13
+ };
14
+
15
+ const platformKey = `${process.platform}-${process.arch}`;
16
+ const pkg = PLATFORM_MAP[platformKey];
17
+
18
+ if (!pkg) {
19
+ console.error(
20
+ `Error: Unsupported platform ${process.platform}-${process.arch}.\n` +
21
+ `Supported platforms: ${Object.keys(PLATFORM_MAP).join(", ")}`
22
+ );
23
+ process.exit(1);
24
+ }
25
+
26
+ let binPath;
27
+ try {
28
+ binPath = path.join(
29
+ path.dirname(require.resolve(`${pkg}/package.json`)),
30
+ "bin",
31
+ "enter"
32
+ );
33
+ } catch {
34
+ console.error(
35
+ `Error: Could not find package "${pkg}".\n` +
36
+ `Please reinstall @enter-pro/enter-code to fix this issue.`
37
+ );
38
+ process.exit(1);
39
+ }
40
+
41
+ const result = require("child_process").spawnSync(binPath, process.argv.slice(2), {
42
+ stdio: "inherit",
43
+ });
44
+
45
+ if (result.error) {
46
+ console.error(`Error: Failed to run Enter CLI: ${result.error.message}`);
47
+ process.exit(1);
48
+ }
49
+
50
+ process.exit(result.status ?? 1);
package/package.json ADDED
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "@enter-pro/enter-code",
3
+ "version": "0.0.1",
4
+ "description": "Enter CLI - AI-powered coding assistant",
5
+ "bin": {
6
+ "enter": "bin/enter"
7
+ },
8
+ "optionalDependencies": {
9
+ "@enter-pro/enter-code-darwin-arm64": "0.0.1",
10
+ "@enter-pro/enter-code-darwin-x64": "0.0.1",
11
+ "@enter-pro/enter-code-linux-arm64": "0.0.1",
12
+ "@enter-pro/enter-code-linux-x64": "0.0.1"
13
+ },
14
+ "license": "MIT",
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "https://gitlab.knoffice.tech/engineering/enter_agent_sdk"
18
+ }
19
+ }