@alienplatform/testing 0.1.0 → 1.3.4
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/LICENSE.md +105 -0
- package/README.md +61 -274
- package/dist/errors.js +37 -0
- package/dist/errors.js.map +1 -0
- package/dist/external-secrets.js +140 -0
- package/dist/external-secrets.js.map +1 -0
- package/dist/index.d.ts +165 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +458 -0
- package/dist/index.js.map +1 -0
- package/package.json +12 -14
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["execFileAsync"],"sources":["../src/deployment.ts","../src/deploy.ts"],"sourcesContent":["/**\n * Deployment — handle to a deployed application for testing\n *\n * Supports two deployment modes:\n * - Dev mode: manages a child `alien dev` process (local platform)\n * - API mode: manages a deployment via platform API (cloud platforms)\n */\n\nimport { execFile } from \"node:child_process\"\nimport type { ChildProcess } from \"node:child_process\"\nimport { readFileSync } from \"node:fs\"\nimport { resolve } from \"node:path\"\nimport { promisify } from \"node:util\"\nimport { CommandsClient } from \"@alienplatform/sdk/commands\"\nimport type { DeploymentInit, Platform, UpgradeOptions } from \"./types.js\"\n\nconst execFileAsync = promisify(execFile)\n\nexport class Deployment {\n readonly id: string\n readonly name: string\n readonly url: string\n readonly platform: Platform\n\n /** Whether the deployment has been destroyed */\n destroyed = false\n\n private process?: ChildProcess\n private commandsUrl: string\n private appPath: string\n\n // API mode fields\n private apiUrl?: string\n private apiKey?: string\n\n constructor(params: DeploymentInit) {\n this.id = params.id\n this.name = params.name\n this.url = params.url\n this.platform = params.platform\n this.commandsUrl = params.commandsUrl\n this.process = params.process\n this.appPath = params.appPath\n this.apiUrl = params.apiUrl\n this.apiKey = params.apiKey\n }\n\n /**\n * Invoke a command on the deployment\n */\n async invokeCommand(name: string, params: any): Promise<any> {\n const token = this.apiKey ?? \"\"\n const arc = new CommandsClient({\n managerUrl: this.commandsUrl,\n deploymentId: this.id,\n token,\n allowLocalStorage: this.platform === \"local\",\n })\n\n return arc.invoke(name, params)\n }\n\n /**\n * Set an external secret using platform-native tools\n */\n async setExternalSecret(\n vaultName: string,\n secretKey: string,\n secretValue: string,\n ): Promise<void> {\n const { setExternalSecret } = await import(\"./external-secrets.js\")\n const stateDir = this.appPath ? `${this.appPath}/.alien` : undefined\n await setExternalSecret(\n this.platform,\n this.name, // resourcePrefix (cloud: naming prefix, local: unused)\n vaultName,\n secretKey,\n secretValue,\n undefined, // namespace\n stateDir,\n this.id, // deploymentId (local: used for vault path)\n )\n }\n\n /**\n * Upgrade the deployment by creating a new release and updating the deployment.\n * Only works for API-mode deployments (cloud platforms).\n */\n async upgrade(options: UpgradeOptions = {}): Promise<void> {\n if (!this.apiUrl || !this.apiKey) {\n throw new Error(\"upgrade() requires a cloud deployment (not local dev mode)\")\n }\n\n const headers = {\n Authorization: `Bearer ${this.apiKey}`,\n \"Content-Type\": \"application/json\",\n }\n\n // Build new artifacts\n const cliPath = this.resolveCliPath()\n const buildArgs = [\"build\", \"--platform\", this.platform]\n await execFileAsync(cliPath, buildArgs, { cwd: this.appPath })\n\n // Read the built stack\n const stackPath = resolve(this.appPath, \".alien\", \"stack.json\")\n const stack = JSON.parse(readFileSync(stackPath, \"utf-8\"))\n\n // Create a new release\n const releaseResp = await fetch(`${this.apiUrl}/v1/releases`, {\n method: \"POST\",\n headers,\n body: JSON.stringify({ stack }),\n })\n\n if (!releaseResp.ok) {\n const body = await releaseResp.text()\n throw new Error(`Failed to create release for upgrade: ${releaseResp.status} ${body}`)\n }\n\n const release = (await releaseResp.json()) as { id: string }\n\n // Update the deployment with the new release and optional env vars\n const patchBody: Record<string, unknown> = { releaseId: release.id }\n if (options.environmentVariables?.length) {\n patchBody.environmentVariables = options.environmentVariables\n }\n\n const patchResp = await fetch(`${this.apiUrl}/v1/deployments/${this.id}`, {\n method: \"PATCH\",\n headers,\n body: JSON.stringify(patchBody),\n })\n\n if (!patchResp.ok) {\n const body = await patchResp.text()\n throw new Error(`Failed to update deployment for upgrade: ${patchResp.status} ${body}`)\n }\n\n // Wait for deployment to pick up the new release\n const timeout = 300_000 // 5 minutes\n const start = Date.now()\n while (Date.now() - start < timeout) {\n const resp = await fetch(`${this.apiUrl}/v1/deployments/${this.id}`, {\n headers: { Authorization: `Bearer ${this.apiKey}` },\n })\n if (resp.ok) {\n const data = (await resp.json()) as { status: string; releaseId: string }\n if (data.releaseId === release.id && data.status === \"running\") {\n return\n }\n if (data.status === \"error\" || data.status.includes(\"failed\")) {\n throw new Error(`Deployment failed during upgrade with status: ${data.status}`)\n }\n }\n await new Promise(r => setTimeout(r, 5000))\n }\n\n throw new Error(\"Timeout waiting for deployment to pick up upgrade\")\n }\n\n /**\n * Destroy the deployment.\n *\n * For dev mode: kills the `alien dev` process.\n * For API mode: calls DELETE on platform API.\n */\n async destroy(): Promise<void> {\n if (this.destroyed) return\n\n // Dev mode — kill the process\n if (this.process) {\n if (!this.process.killed) {\n this.process.kill(\"SIGTERM\")\n\n await new Promise<void>(resolve => {\n const timeout = setTimeout(() => {\n if (!this.process!.killed) {\n this.process!.kill(\"SIGKILL\")\n }\n resolve()\n }, 5000)\n\n this.process!.once(\"exit\", () => {\n clearTimeout(timeout)\n resolve()\n })\n })\n }\n this.destroyed = true\n return\n }\n\n // API mode — delete via platform API\n if (this.apiUrl && this.apiKey) {\n const headers = { Authorization: `Bearer ${this.apiKey}` }\n\n // Delete via platform API\n const resp = await fetch(`${this.apiUrl}/v1/deployments/${this.id}`, {\n method: \"DELETE\",\n headers,\n })\n\n if (!resp.ok && resp.status !== 404) {\n const body = await resp.text()\n throw new Error(`Failed to destroy deployment: ${resp.status} ${body}`)\n }\n\n // Poll until deployment is gone or destroyed\n const timeout = 300_000 // 5 minutes\n const start = Date.now()\n while (Date.now() - start < timeout) {\n const checkResp = await fetch(`${this.apiUrl}/v1/deployments/${this.id}`, { headers })\n if (checkResp.status === 404) break\n if (checkResp.ok) {\n const data = (await checkResp.json()) as { status: string }\n if (data.status === \"destroyed\" || data.status === \"deleted\") break\n }\n await new Promise(r => setTimeout(r, 5000))\n }\n }\n\n this.destroyed = true\n }\n\n private resolveCliPath(): string {\n const raw = process.env.ALIEN_CLI_PATH?.trim()\n if (raw) {\n return raw.includes(\"/\") || raw.includes(\"\\\\\") ? resolve(raw) : raw\n }\n return \"alien\"\n }\n}\n","/**\n * deploy() — single entry point for deploying an Alien application for testing\n *\n * Auto-detects the deployment method based on the target platform:\n * - local (default): spawns `alien dev` and watches its status file contract\n * - aws / gcp / azure: builds + creates release/deployment via platform API — reads ALIEN_API_KEY from env\n */\n\nimport { execFile, spawn } from \"node:child_process\"\nimport { existsSync, readFileSync, rmSync } from \"node:fs\"\nimport { dirname, join, resolve } from \"node:path\"\nimport { promisify } from \"node:util\"\nimport { AlienError } from \"@alienplatform/core\"\nimport type { DevStatus } from \"@alienplatform/core\"\nimport getPort from \"get-port\"\nimport { Deployment } from \"./deployment.js\"\nimport { TestingOperationFailedError, withTestingContext } from \"./errors.js\"\nimport type { DeployOptions } from \"./types.js\"\n\nconst execFileAsync = promisify(execFile)\n\ntype DevStatusAgent = DevStatus[\"agents\"][string] & {\n commandsUrl?: string | null\n}\n\n/**\n * Get the alien CLI path with fallback discovery.\n *\n * Resolution order:\n * 1. ALIEN_CLI_PATH (if set)\n * 2. nearest ../target/debug/alien (or alien.exe) walking upward from app path\n * 3. \"alien\" from PATH\n */\nfunction getAlienCliPath(appPath: string): string {\n const raw = process.env.ALIEN_CLI_PATH?.trim()\n if (raw) {\n if (raw.includes(\"/\") || raw.includes(\"\\\\\")) {\n return resolve(raw)\n }\n return raw\n }\n\n let current = resolve(appPath)\n while (true) {\n const unixCandidate = join(current, \"target\", \"debug\", \"alien\")\n if (existsSync(unixCandidate)) {\n return unixCandidate\n }\n const windowsCandidate = `${unixCandidate}.exe`\n if (existsSync(windowsCandidate)) {\n return windowsCandidate\n }\n\n const parent = dirname(current)\n if (parent === current) {\n break\n }\n current = parent\n }\n\n return \"alien\"\n}\n\n/**\n * Deploy an Alien application for testing.\n *\n * Uses local dev mode by default. Set `platform` to a cloud provider\n * to deploy via the platform API (requires ALIEN_API_KEY env var).\n */\nexport async function deploy(options: DeployOptions): Promise<Deployment> {\n const platform = options.platform ?? \"local\"\n\n if (platform === \"local\") {\n return deployViaDev(options)\n }\n\n // Cloud platforms: aws, gcp, azure\n return deployViaApi(options)\n}\n\n// ---------------------------------------------------------------------------\n// Method: dev — spawns `alien dev` as a child process\n// ---------------------------------------------------------------------------\n\nasync function deployViaDev(options: DeployOptions): Promise<Deployment> {\n const verbose = options.verbose ?? process.env.VERBOSE === \"true\"\n const port = await getPort()\n const cliPath = getAlienCliPath(options.app)\n const statusFile = join(options.app, \".alien\", \"testing-dev-status.json\")\n\n const args = [\"dev\", \"--port\", String(port), \"--status-file\", statusFile]\n\n if (options.config) {\n args.push(\"--config\", options.config)\n }\n\n for (const ev of options.environmentVariables ?? []) {\n const flag = ev.type === \"secret\" ? \"--secret\" : \"--env\"\n const targets = ev.targetResources?.length ? `:${ev.targetResources.join(\",\")}` : \"\"\n args.push(flag, `${ev.name}=${ev.value}${targets}`)\n }\n\n if (verbose) {\n console.log(`[testing] Spawning: ${cliPath} ${args.join(\" \")}`)\n }\n\n // Clean .alien state directory to ensure fresh deployment state.\n const alienStateDir = join(options.app, \".alien\")\n rmSync(alienStateDir, { recursive: true, force: true })\n\n const childEnv: Record<string, string> = {\n ...(process.env as Record<string, string>),\n }\n\n const proc = spawn(cliPath, args, {\n cwd: options.app,\n env: childEnv,\n stdio: [\"ignore\", \"pipe\", \"pipe\"],\n })\n\n let stdout = \"\"\n let stderr = \"\"\n\n proc.stdout?.on(\"data\", (data: Buffer) => {\n stdout += data.toString()\n if (verbose) {\n process.stdout.write(data)\n }\n })\n\n proc.stderr?.on(\"data\", (data: Buffer) => {\n stderr += data.toString()\n if (verbose) {\n process.stderr.write(data)\n }\n })\n\n let exited = false\n let exitCode: number | null = null\n proc.on(\"exit\", code => {\n exited = true\n exitCode = code\n })\n proc.on(\"error\", err => {\n exited = true\n exitCode = 1\n stderr += `\\nFailed to spawn alien CLI: ${err.message}`\n })\n\n try {\n const status = await waitForDevStatusReady(\n statusFile,\n () => exited,\n () => exitCode,\n () => stderr,\n )\n\n const agent = findPrimaryAgent(status)\n\n const publicUrl = findPublicUrl(agent.resources)\n if (!publicUrl) {\n throw new AlienError(\n TestingOperationFailedError.create({\n operation: \"resolve-public-url\",\n message: \"No public URL found in deployment resources\",\n details: { resources: agent.resources },\n }),\n )\n }\n\n if (verbose) {\n console.log(`[testing] Public URL: ${publicUrl}`)\n if (agent.commandsUrl) {\n console.log(`[testing] Commands URL: ${agent.commandsUrl}`)\n }\n }\n\n if (!agent.commandsUrl) {\n throw new AlienError(\n TestingOperationFailedError.create({\n operation: \"resolve-commands-url\",\n message: \"alien dev status file did not include a commands URL\",\n details: { agent },\n }),\n )\n }\n\n return new Deployment({\n id: agent.id,\n name: agent.name,\n url: publicUrl,\n platform: options.platform ?? \"local\",\n commandsUrl: agent.commandsUrl,\n process: proc,\n appPath: options.app,\n })\n } catch (error) {\n proc.kill(\"SIGTERM\")\n throw await withTestingContext(\n error,\n \"deploy\",\n \"Failed while waiting for alien dev to become ready\",\n { statusFile, appPath: options.app, platform: options.platform ?? \"local\" },\n )\n }\n}\n\n// ---------------------------------------------------------------------------\n// Method: api — direct platform API calls (reads ALIEN_API_KEY from env)\n// ---------------------------------------------------------------------------\n\ninterface PlatformDeploymentResponse {\n id: string\n name: string\n status: string\n releaseId: string\n url?: string\n commandsUrl?: string\n}\n\ninterface PlatformReleaseResponse {\n id: string\n version: number\n}\n\nasync function deployViaApi(options: DeployOptions): Promise<Deployment> {\n const platform = options.platform ?? \"local\"\n const verbose = options.verbose ?? process.env.VERBOSE === \"true\"\n\n const apiKey = process.env.ALIEN_API_KEY\n if (!apiKey) {\n throw new Error(\n `Cloud deployment (platform: '${platform}') requires the ALIEN_API_KEY environment variable to be set`,\n )\n }\n\n const apiUrl = process.env.ALIEN_API_URL ?? \"https://api.alien.dev\"\n\n const headers = {\n Authorization: `Bearer ${apiKey}`,\n \"Content-Type\": \"application/json\",\n }\n\n // 1. Build the application\n if (verbose) console.log(\"[testing:api] Building application...\")\n const cliPath = getAlienCliPath(options.app)\n const buildArgs = [\"build\", \"--platform\", platform]\n if (options.config) {\n buildArgs.push(\"--config\", options.config)\n }\n await execFileAsync(cliPath, buildArgs, { cwd: options.app })\n\n // 2. Read the built stack\n const stackPath = resolve(options.app, \".alien\", \"stack.json\")\n if (!existsSync(stackPath)) {\n throw new Error(`Build did not produce stack.json at ${stackPath}`)\n }\n const stack = JSON.parse(readFileSync(stackPath, \"utf-8\"))\n\n // 3. Create a release\n if (verbose) console.log(\"[testing:api] Creating release...\")\n const releaseResp = await fetch(`${apiUrl}/v1/releases`, {\n method: \"POST\",\n headers,\n body: JSON.stringify({ stack }),\n })\n\n if (!releaseResp.ok) {\n const body = await releaseResp.text()\n throw new Error(`Failed to create release: ${releaseResp.status} ${body}`)\n }\n\n const release = (await releaseResp.json()) as PlatformReleaseResponse\n\n // 4. Create a deployment\n if (verbose) console.log(\"[testing:api] Creating deployment...\")\n const deploymentName = `e2e-${Date.now()}`\n const deployBody: Record<string, unknown> = {\n releaseId: release.id,\n platform,\n name: deploymentName,\n }\n\n if (options.environmentVariables?.length) {\n deployBody.environmentVariables = options.environmentVariables\n }\n\n const deployResp = await fetch(`${apiUrl}/v1/deployments`, {\n method: \"POST\",\n headers,\n body: JSON.stringify(deployBody),\n })\n\n if (!deployResp.ok) {\n const body = await deployResp.text()\n throw new Error(`Failed to create deployment: ${deployResp.status} ${body}`)\n }\n\n const deployment = (await deployResp.json()) as PlatformDeploymentResponse\n\n // 5. Poll until running\n if (verbose) console.log(`[testing:api] Waiting for deployment ${deployment.id} to be running...`)\n const running = await waitForPlatformDeploymentRunning(apiUrl, apiKey, deployment.id, verbose)\n\n return new Deployment({\n id: running.id,\n name: running.name,\n url: running.url!,\n platform,\n commandsUrl: running.commandsUrl!,\n appPath: options.app,\n apiUrl,\n apiKey,\n })\n}\n\n// ---------------------------------------------------------------------------\n// Shared helpers\n// ---------------------------------------------------------------------------\n\n/**\n * Wait for `alien dev` to report a ready local session via its status file.\n */\nasync function waitForDevStatusReady(\n statusFile: string,\n hasExited: () => boolean,\n getExitCode: () => number | null,\n getStderr: () => string,\n): Promise<DevStatus> {\n const timeout = 900_000\n const pollInterval = 500\n const start = Date.now()\n\n while (Date.now() - start < timeout) {\n if (hasExited()) {\n throw new AlienError(\n TestingOperationFailedError.create({\n operation: \"wait-for-ready\",\n message: \"alien dev exited before the local session became ready\",\n details: {\n exitCode: getExitCode(),\n stderrTail: getStderr().slice(-1000),\n },\n }),\n )\n }\n\n if (!existsSync(statusFile)) {\n await new Promise(r => setTimeout(r, pollInterval))\n continue\n }\n\n try {\n const status = JSON.parse(readFileSync(statusFile, \"utf-8\")) as DevStatus\n if (status.status === \"error\") {\n throw new AlienError(\n TestingOperationFailedError.create({\n operation: \"wait-for-ready\",\n message: \"alien dev reported an error status\",\n details: { status },\n }),\n )\n }\n\n if (status.status === \"ready\" && Object.keys(status.agents ?? {}).length > 0) {\n return status\n }\n } catch (error) {\n if (error instanceof AlienError && error.code === \"TESTING_OPERATION_FAILED\") {\n throw error\n }\n // Status file may be mid-write; retry.\n }\n\n await new Promise(r => setTimeout(r, pollInterval))\n }\n\n throw new AlienError(\n TestingOperationFailedError.create({\n operation: \"wait-for-ready\",\n message: `Timeout waiting for alien dev to report readiness (${timeout / 1000}s)`,\n details: { statusFile, timeoutMs: timeout },\n }),\n )\n}\n\nfunction findPrimaryAgent(status: DevStatus): DevStatusAgent {\n const agent = Object.values(status.agents ?? {})[0] as DevStatusAgent | undefined\n if (!agent) {\n throw new AlienError(\n TestingOperationFailedError.create({\n operation: \"resolve-agent\",\n message: \"alien dev reported readiness but no agents were present in the status file\",\n details: { status },\n }),\n )\n }\n\n return agent\n}\n\n/**\n * Wait for a platform API deployment to reach \"running\" status.\n */\nasync function waitForPlatformDeploymentRunning(\n apiUrl: string,\n apiKey: string,\n deploymentId: string,\n verbose: boolean,\n): Promise<PlatformDeploymentResponse> {\n const timeout = 900_000 // 15 minutes\n const pollInterval = 5000\n const start = Date.now()\n const headers = { Authorization: `Bearer ${apiKey}` }\n\n while (Date.now() - start < timeout) {\n try {\n const resp = await fetch(`${apiUrl}/v1/deployments/${deploymentId}`, {\n headers,\n signal: AbortSignal.timeout(10000),\n })\n\n if (resp.ok) {\n const data = (await resp.json()) as PlatformDeploymentResponse\n if (verbose) {\n console.log(`[testing] Deployment ${deploymentId} status: ${data.status}`)\n }\n\n if (data.status === \"running\") {\n if (!data.url) {\n throw new Error(`Deployment is running but has no URL: ${JSON.stringify(data)}`)\n }\n return data\n }\n\n if (data.status === \"error\" || data.status.includes(\"failed\")) {\n throw new Error(`Deployment failed with status: ${data.status}`)\n }\n }\n } catch (error) {\n if (error instanceof Error && error.message.includes(\"failed with status\")) {\n throw error\n }\n // Network errors expected during provisioning\n }\n\n await new Promise(r => setTimeout(r, pollInterval))\n }\n\n throw new Error(\n `Timeout waiting for deployment ${deploymentId} to reach running status (${timeout / 1000}s)`,\n )\n}\n\n/**\n * Find the public URL from deployment resources\n */\nfunction findPublicUrl(\n resources: Record<string, { url: string; resourceType?: string | null }>,\n): string | undefined {\n for (const [name, resource] of Object.entries(resources)) {\n if (\n resource.url &&\n (name.includes(\"router\") || name.includes(\"gateway\") || name.includes(\"proxy\"))\n ) {\n return resource.url\n }\n }\n\n const publicResources = Object.entries(resources).filter(\n ([_, r]) => (r.resourceType === \"container\" || r.resourceType === \"function\") && r.url,\n )\n if (publicResources.length > 0) {\n return publicResources[publicResources.length - 1]![1].url\n }\n\n return undefined\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAgBA,MAAMA,kBAAgB,UAAU,SAAS;AAEzC,IAAa,aAAb,MAAwB;CACtB;CACA;CACA;CACA;;CAGA,YAAY;CAEZ;CACA;CACA;CAGA;CACA;CAEA,YAAY,QAAwB;AACl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C,KAAK,SAAS;;WAG7D,OAAO;AACd,OAAI,iBAAiB,SAAS,MAAM,QAAQ,SAAS,qBAAqB,CACxE,OAAM;;AAKV,QAAM,IAAI,SAAQ,MAAK,WAAW,GAAG,aAAa,CAAC;;AAGrD,OAAM,IAAI,MACR,kCAAkC,aAAa,4BAA4B,UAAU,IAAK,IAC3F;;;;;AAMH,SAAS,cACP,WACoB;AACpB,MAAK,MAAM,CAAC,MAAM,aAAa,OAAO,QAAQ,UAAU,CACtD,KACE,SAAS,QACR,KAAK,SAAS,SAAS,IAAI,KAAK,SAAS,UAAU,IAAI,KAAK,SAAS,QAAQ,EAE9E,QAAO,SAAS;CAIpB,MAAM,kBAAkB,OAAO,QAAQ,UAAU,CAAC,QAC/C,CAAC,GAAG,QAAQ,EAAE,iBAAiB,eAAe,EAAE,iBAAiB,eAAe,EAAE,IACpF;AACD,KAAI,gBAAgB,SAAS,EAC3B,QAAO,gBAAgB,gBAAgB,SAAS,GAAI,GAAG"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alienplatform/testing",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.3.4",
|
|
4
4
|
"description": "Testing framework for Alien applications",
|
|
5
|
+
"author": "Alien Software, Inc. <hi@alien.dev>",
|
|
6
|
+
"license": "FSL-1.1-Apache-2.0",
|
|
7
|
+
"homepage": "https://alien.dev",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/alienplatform/alien.git",
|
|
11
|
+
"directory": "packages/testing"
|
|
12
|
+
},
|
|
5
13
|
"type": "module",
|
|
6
14
|
"main": "./dist/index.js",
|
|
7
15
|
"types": "./dist/index.d.ts",
|
|
@@ -20,21 +28,16 @@
|
|
|
20
28
|
"dependencies": {
|
|
21
29
|
"get-port": "^7.1.0",
|
|
22
30
|
"zod": "4.3.2",
|
|
23
|
-
"@alienplatform/
|
|
24
|
-
"@alienplatform/core": "1.
|
|
31
|
+
"@alienplatform/sdk": "1.3.4",
|
|
32
|
+
"@alienplatform/core": "1.3.4"
|
|
25
33
|
},
|
|
26
34
|
"peerDependencies": {
|
|
27
|
-
"@aws-sdk/client-cloudformation": "^3.0.0",
|
|
28
35
|
"@aws-sdk/client-ssm": "^3.0.0",
|
|
29
36
|
"@azure/identity": "^4.0.0",
|
|
30
37
|
"@azure/keyvault-secrets": "^4.0.0",
|
|
31
|
-
"@google-cloud/secret-manager": "^5.0.0"
|
|
32
|
-
"@kubernetes/client-node": "^0.21.0"
|
|
38
|
+
"@google-cloud/secret-manager": "^5.0.0"
|
|
33
39
|
},
|
|
34
40
|
"peerDependenciesMeta": {
|
|
35
|
-
"@aws-sdk/client-cloudformation": {
|
|
36
|
-
"optional": true
|
|
37
|
-
},
|
|
38
41
|
"@aws-sdk/client-ssm": {
|
|
39
42
|
"optional": true
|
|
40
43
|
},
|
|
@@ -46,18 +49,13 @@
|
|
|
46
49
|
},
|
|
47
50
|
"@azure/identity": {
|
|
48
51
|
"optional": true
|
|
49
|
-
},
|
|
50
|
-
"@kubernetes/client-node": {
|
|
51
|
-
"optional": true
|
|
52
52
|
}
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"@aws-sdk/client-cloudformation": "^3.0.0",
|
|
56
55
|
"@aws-sdk/client-ssm": "^3.0.0",
|
|
57
56
|
"@azure/identity": "^4.0.0",
|
|
58
57
|
"@azure/keyvault-secrets": "^4.0.0",
|
|
59
58
|
"@google-cloud/secret-manager": "^5.0.0",
|
|
60
|
-
"@kubernetes/client-node": "^0.21.0",
|
|
61
59
|
"@types/node": "^24.0.15",
|
|
62
60
|
"tsdown": "^0.13.0",
|
|
63
61
|
"typescript": "^5.8.3",
|