@alloy-cd/sdk 0.0.6 → 0.0.7

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/bin/alloy.cjs ADDED
@@ -0,0 +1,37 @@
1
+ #!/usr/bin/env node
2
+ const { spawnSync } = require("node:child_process");
3
+
4
+ const platform = process.platform;
5
+ const arch = process.arch;
6
+ const packageName = platform === "darwin" && arch === "arm64"
7
+ ? "@alloy-cd/sdk-darwin-arm64"
8
+ : platform === "darwin" && arch === "x64"
9
+ ? "@alloy-cd/sdk-darwin-x64"
10
+ : platform === "linux" && arch === "arm64"
11
+ ? "@alloy-cd/sdk-linux-arm64"
12
+ : platform === "linux" && arch === "x64"
13
+ ? "@alloy-cd/sdk-linux-x64"
14
+ : platform === "win32" && arch === "x64"
15
+ ? "@alloy-cd/sdk-win32-x64"
16
+ : undefined;
17
+
18
+ if (!packageName) {
19
+ console.error(`Unsupported platform: ${platform} ${arch}`);
20
+ process.exit(1);
21
+ }
22
+
23
+ let binary;
24
+ try {
25
+ binary = require.resolve(`${packageName}/bin/alloy`);
26
+ } catch {
27
+ try {
28
+ binary = require.resolve(`${packageName}/bin/alloy.exe`);
29
+ } catch {
30
+ console.error(`Missing Alloy binary package: ${packageName}`);
31
+ console.error("Try reinstalling @alloy-cd/sdk.");
32
+ process.exit(1);
33
+ }
34
+ }
35
+
36
+ const result = spawnSync(binary, process.argv.slice(2), { stdio: "inherit" });
37
+ process.exit(result.status ?? 1);
@@ -0,0 +1 @@
1
+ function o(_0x5cb34c){return _0x5cb34c;}export{o as defineConfig};
package/package.json CHANGED
@@ -1,42 +1,30 @@
1
1
  {
2
2
  "name": "@alloy-cd/sdk",
3
- "version": "0.0.6",
4
- "private": false,
3
+ "version": "0.0.7",
5
4
  "type": "module",
6
- "repository": {
7
- "type": "git",
8
- "url": "git+https://github.com/alloy-cd/alloy.git",
9
- "directory": "apps/sdk"
5
+ "bin": {
6
+ "alloy": "./bin/alloy.cjs"
10
7
  },
11
- "main": "./dist/package/index.js",
12
- "types": "./dist/package/index.d.ts",
8
+ "main": "./package/index.js",
9
+ "types": "./package/index.d.ts",
13
10
  "exports": {
14
11
  ".": {
15
- "types": "./dist/package/index.d.ts",
16
- "import": "./dist/package/index.js"
12
+ "types": "./package/index.d.ts",
13
+ "import": "./package/index.js"
17
14
  }
18
15
  },
19
- "bin": {
20
- "alloy": "dist/cli/index.js"
16
+ "optionalDependencies": {
17
+ "@alloy-cd/sdk-darwin-arm64": "0.0.7",
18
+ "@alloy-cd/sdk-darwin-x64": "0.0.7",
19
+ "@alloy-cd/sdk-linux-arm64": "0.0.7",
20
+ "@alloy-cd/sdk-linux-x64": "0.0.7",
21
+ "@alloy-cd/sdk-win32-x64": "0.0.7"
21
22
  },
22
- "files": [
23
- "dist"
24
- ],
25
23
  "publishConfig": {
26
24
  "access": "public"
27
25
  },
28
- "scripts": {
29
- "build": "rm -rf dist .turbo/tsconfig.types.tsbuildinfo && mkdir -p dist/cli dist/package && bun build src/cli/index.ts --outfile dist/cli/index.js --target bun --minify --define process.env.ALLOY_SDK_VERSION='\"'\"${ALLOY_SDK_VERSION:-}\"'\"' && bun build src/package/index.ts --outfile dist/package/index.js --target bun --minify && javascript-obfuscator dist/cli/index.js --output dist/cli/index.js --compact true --control-flow-flattening true --control-flow-flattening-threshold 0.5 && javascript-obfuscator dist/package/index.js --output dist/package/index.js --compact true && tsc -p tsconfig.types.json",
30
- "dev": "bun run src/cli/index.ts",
31
- "typecheck": "tsc --noEmit -p tsconfig.json",
32
- "lint": "biome lint .",
33
- "lint:fix": "biome lint --write .",
34
- "knip": "cd ../.. && bunx knip-bun --workspace apps/sdk --no-progress --production"
35
- },
36
- "dependencies": {},
37
- "devDependencies": {
38
- "@types/bun": "^1.3.14",
39
- "javascript-obfuscator": "^5.4.3",
40
- "typescript": "^5.9.3"
41
- }
26
+ "files": [
27
+ "bin",
28
+ "package"
29
+ ]
42
30
  }
package/dist/cli/index.js DELETED
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env bun
2
- function a0_0x6083(_0x12f5d5,_0x3f63dc){_0x12f5d5=_0x12f5d5-0x66;var _0xe17a9d=a0_0xe17a();var _0x6083f7=_0xe17a9d[_0x12f5d5];return _0x6083f7;}var a0_0x2a6e78=a0_0x6083;(function(_0x5de87a,_0x3671e7){var _0x1dc7f7=a0_0x6083,_0x12dbd1=_0x5de87a();while(!![]){try{var _0xdc5f76=parseInt(_0x1dc7f7(0x7f))/0x1*(-parseInt(_0x1dc7f7(0x6d))/0x2)+-parseInt(_0x1dc7f7(0x8b))/0x3+parseInt(_0x1dc7f7(0x8d))/0x4+parseInt(_0x1dc7f7(0x82))/0x5+-parseInt(_0x1dc7f7(0x66))/0x6+-parseInt(_0x1dc7f7(0x7e))/0x7*(parseInt(_0x1dc7f7(0x6f))/0x8)+parseInt(_0x1dc7f7(0x7d))/0x9;if(_0xdc5f76===_0x3671e7)break;else _0x12dbd1['push'](_0x12dbd1['shift']());}catch(_0x5ed356){_0x12dbd1['push'](_0x12dbd1['shift']());}}}(a0_0xe17a,0xd7e7a));function a0_0xe17a(){var _0x3b9747=['./dist/package/index.js','^1.3.14','git','error','2158mcSEFm','apps/sdk','32zGauHL','exists','alloy.config.ts','MBtLG','exit','Commands:','init','MyWpq','log','cd\x20../..\x20&&\x20bunx\x20knip-bun\x20--workspace\x20apps/sdk\x20--no-progress\x20--production','write','@alloy-cd/sdk','Unknown\x20command:\x20','dist','16779348hHgMKd','1504937sttMAE','1356pQZnYP','import\x20{\x20defineConfig\x20}\x20from\x20\x22','alloy.config.ts\x20already\x20exists','8748905GLUcGW','name','0.0.6','--help','bun\x20run\x20src/cli/index.ts','biome\x20lint\x20--write\x20.','./dist/package/index.d.ts','biome\x20lint\x20.','Usage:\x20alloy\x20<command>','4597563QZNjJy','^5.4.3','5991612gkHViH','file','--version','git+https://github.com/alloy-cd/alloy.git','2232606OZKbGT','Created\x20alloy.config.ts','\x20\x20init\x20\x20\x20\x20\x20\x20\x20Create\x20an\x20alloy.config.ts\x20file'];a0_0xe17a=function(){return _0x3b9747;};return a0_0xe17a();}var e={'name':a0_0x2a6e78(0x7a),'version':a0_0x2a6e78(0x84),'private':!0x1,'type':'module','repository':{'type':a0_0x2a6e78(0x6b),'url':a0_0x2a6e78(0x90),'directory':a0_0x2a6e78(0x6e)},'main':a0_0x2a6e78(0x69),'types':a0_0x2a6e78(0x88),'exports':{'.':{'types':a0_0x2a6e78(0x88),'import':a0_0x2a6e78(0x69)}},'bin':{'alloy':'dist/cli/index.js'},'files':[a0_0x2a6e78(0x7c)],'publishConfig':{'access':'public'},'scripts':{'build':'rm\x20-rf\x20dist\x20.turbo/tsconfig.types.tsbuildinfo\x20&&\x20mkdir\x20-p\x20dist/cli\x20dist/package\x20&&\x20bun\x20build\x20src/cli/index.ts\x20--outfile\x20dist/cli/index.js\x20--target\x20bun\x20--minify\x20--define\x20process.env.ALLOY_SDK_VERSION=\x27\x22\x27\x22${ALLOY_SDK_VERSION:-}\x22\x27\x22\x27\x20&&\x20bun\x20build\x20src/package/index.ts\x20--outfile\x20dist/package/index.js\x20--target\x20bun\x20--minify\x20&&\x20javascript-obfuscator\x20dist/cli/index.js\x20--output\x20dist/cli/index.js\x20--compact\x20true\x20--control-flow-flattening\x20true\x20--control-flow-flattening-threshold\x200.5\x20&&\x20javascript-obfuscator\x20dist/package/index.js\x20--output\x20dist/package/index.js\x20--compact\x20true\x20&&\x20tsc\x20-p\x20tsconfig.types.json','dev':a0_0x2a6e78(0x86),'typecheck':'tsc\x20--noEmit\x20-p\x20tsconfig.json','lint':a0_0x2a6e78(0x89),'lint:fix':a0_0x2a6e78(0x87),'knip':a0_0x2a6e78(0x78)},'dependencies':{},'devDependencies':{'@types/bun':a0_0x2a6e78(0x6a),'javascript-obfuscator':a0_0x2a6e78(0x8c),'typescript':'^5.9.3'}},i=process['argv'][0x2],s=a0_0x2a6e78(0x84);function n(){var _0x446db2=a0_0x2a6e78,_0x111ef5={'MBtLG':'\x20\x20--version\x20\x20Print\x20the\x20CLI\x20version'};console[_0x446db2(0x77)](e[_0x446db2(0x83)]+'\x20'+s),console[_0x446db2(0x77)](_0x446db2(0x8a)),console[_0x446db2(0x77)](''),console[_0x446db2(0x77)](_0x446db2(0x74)),console['log'](_0x446db2(0x68)),console['log'](_0x111ef5[_0x446db2(0x72)]);}async function o(){var _0x180baf=a0_0x2a6e78,_0x35d889={'MyWpq':_0x180baf(0x81),'qHBxO':_0x180baf(0x67)};if(await Bun[_0x180baf(0x8e)](_0x180baf(0x71))[_0x180baf(0x70)]())console[_0x180baf(0x6c)](_0x35d889[_0x180baf(0x76)]),process[_0x180baf(0x73)](0x1);await Bun[_0x180baf(0x79)](_0x180baf(0x71),_0x180baf(0x80)+e[_0x180baf(0x83)]+'\x22;\x0a\x0aexport\x20default\x20defineConfig({\x0a\x20\x20name:\x20\x22my-alloy-app\x22,\x0a});\x0a'),console['log'](_0x35d889['qHBxO']);}switch(i){case a0_0x2a6e78(0x75):await o();break;case a0_0x2a6e78(0x8f):case'-v':console[a0_0x2a6e78(0x77)](s);break;case void 0x0:case a0_0x2a6e78(0x85):case'-h':n();break;default:console[a0_0x2a6e78(0x6c)](a0_0x2a6e78(0x7b)+i),n(),process['exit'](0x1);}
@@ -1 +0,0 @@
1
- function o(_0x5342a7){return _0x5342a7;}export{o as defineConfig};
File without changes