@sitepong/fastnode 0.1.0
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 +81 -0
- package/bin/fastnode.js +13 -0
- package/bin/fastnode.ts +5 -0
- package/dist/actions/index.cjs +7405 -0
- package/dist/actions/index.cjs.map +1 -0
- package/dist/actions/index.d.cts +15 -0
- package/dist/actions/index.d.ts +15 -0
- package/dist/actions/index.mjs +7377 -0
- package/dist/actions/index.mjs.map +1 -0
- package/dist/cert/index.cjs +219 -0
- package/dist/cert/index.cjs.map +1 -0
- package/dist/cert/index.d.cts +4 -0
- package/dist/cert/index.d.ts +4 -0
- package/dist/cert/index.mjs +191 -0
- package/dist/cert/index.mjs.map +1 -0
- package/dist/cert-BmJGtYtb.d.cts +27 -0
- package/dist/cert-owkOFNW8.d.ts +27 -0
- package/dist/cli/index.cjs +7998 -0
- package/dist/cli/index.cjs.map +1 -0
- package/dist/cli/index.d.cts +9 -0
- package/dist/cli/index.d.ts +9 -0
- package/dist/cli/index.mjs +7972 -0
- package/dist/cli/index.mjs.map +1 -0
- package/dist/client/index.cjs +2592 -0
- package/dist/client/index.cjs.map +1 -0
- package/dist/client/index.d.cts +2 -0
- package/dist/client/index.d.ts +2 -0
- package/dist/client/index.mjs +2582 -0
- package/dist/client/index.mjs.map +1 -0
- package/dist/context-CymLkfrS.d.cts +13 -0
- package/dist/context-CymLkfrS.d.ts +13 -0
- package/dist/core/index.cjs +281 -0
- package/dist/core/index.cjs.map +1 -0
- package/dist/core/index.d.cts +1 -0
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.mjs +254 -0
- package/dist/core/index.mjs.map +1 -0
- package/dist/deliver/index.cjs +328 -0
- package/dist/deliver/index.cjs.map +1 -0
- package/dist/deliver/index.d.cts +3 -0
- package/dist/deliver/index.d.ts +3 -0
- package/dist/deliver/index.mjs +322 -0
- package/dist/deliver/index.mjs.map +1 -0
- package/dist/enums-B609j2rb.d.cts +20 -0
- package/dist/enums-B609j2rb.d.ts +20 -0
- package/dist/frameit/index.cjs +247 -0
- package/dist/frameit/index.cjs.map +1 -0
- package/dist/frameit/index.d.cts +1 -0
- package/dist/frameit/index.d.ts +1 -0
- package/dist/frameit/index.mjs +242 -0
- package/dist/frameit/index.mjs.map +1 -0
- package/dist/gym/index.cjs +356 -0
- package/dist/gym/index.cjs.map +1 -0
- package/dist/gym/index.d.cts +2 -0
- package/dist/gym/index.d.ts +2 -0
- package/dist/gym/index.mjs +346 -0
- package/dist/gym/index.mjs.map +1 -0
- package/dist/index-1Vu2cRQ2.d.ts +99 -0
- package/dist/index-A5MimeQk.d.ts +72 -0
- package/dist/index-B0yhu_LZ.d.ts +76 -0
- package/dist/index-B9yXicrQ.d.ts +62 -0
- package/dist/index-BFdNOmPJ.d.cts +53 -0
- package/dist/index-BLubSlgK.d.cts +1513 -0
- package/dist/index-BN0ubxjZ.d.ts +70 -0
- package/dist/index-BQJIJlK7.d.cts +70 -0
- package/dist/index-BYonklf3.d.cts +84 -0
- package/dist/index-BYonklf3.d.ts +84 -0
- package/dist/index-BimqCmY8.d.cts +78 -0
- package/dist/index-BimqCmY8.d.ts +78 -0
- package/dist/index-BoU8qt8r.d.cts +59 -0
- package/dist/index-BoU8qt8r.d.ts +59 -0
- package/dist/index-C2yG3wXA.d.cts +95 -0
- package/dist/index-C2yG3wXA.d.ts +95 -0
- package/dist/index-CR3BFPIz.d.cts +77 -0
- package/dist/index-CR3BFPIz.d.ts +77 -0
- package/dist/index-CWNLnSOL.d.cts +99 -0
- package/dist/index-Cp6cjtd-.d.cts +65 -0
- package/dist/index-Cp6cjtd-.d.ts +65 -0
- package/dist/index-D1Izm7qt.d.ts +1513 -0
- package/dist/index-D5eihzwM.d.cts +76 -0
- package/dist/index-DImN9PWc.d.ts +155 -0
- package/dist/index-DfCUVJX1.d.cts +62 -0
- package/dist/index-DfirmFbC.d.ts +32 -0
- package/dist/index-DkvinY7_.d.ts +54 -0
- package/dist/index-DrUpRXRG.d.cts +155 -0
- package/dist/index-EcVvViW8.d.cts +72 -0
- package/dist/index-HRiaaX-Q.d.cts +54 -0
- package/dist/index-TfXqwuac.d.ts +53 -0
- package/dist/index-lt819Jgj.d.cts +32 -0
- package/dist/index.cjs +8464 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +23 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.mjs +8410 -0
- package/dist/index.mjs.map +1 -0
- package/dist/lane/index.cjs +7641 -0
- package/dist/lane/index.cjs.map +1 -0
- package/dist/lane/index.d.cts +51 -0
- package/dist/lane/index.d.ts +51 -0
- package/dist/lane/index.mjs +7603 -0
- package/dist/lane/index.mjs.map +1 -0
- package/dist/match/index.cjs +942 -0
- package/dist/match/index.cjs.map +1 -0
- package/dist/match/index.d.cts +5 -0
- package/dist/match/index.d.ts +5 -0
- package/dist/match/index.mjs +913 -0
- package/dist/match/index.mjs.map +1 -0
- package/dist/pem/index.cjs +195 -0
- package/dist/pem/index.cjs.map +1 -0
- package/dist/pem/index.d.cts +3 -0
- package/dist/pem/index.d.ts +3 -0
- package/dist/pem/index.mjs +170 -0
- package/dist/pem/index.mjs.map +1 -0
- package/dist/pilot/index.cjs +206 -0
- package/dist/pilot/index.cjs.map +1 -0
- package/dist/pilot/index.d.cts +3 -0
- package/dist/pilot/index.d.ts +3 -0
- package/dist/pilot/index.mjs +196 -0
- package/dist/pilot/index.mjs.map +1 -0
- package/dist/precheck/index.cjs +277 -0
- package/dist/precheck/index.cjs.map +1 -0
- package/dist/precheck/index.d.cts +3 -0
- package/dist/precheck/index.d.ts +3 -0
- package/dist/precheck/index.mjs +274 -0
- package/dist/precheck/index.mjs.map +1 -0
- package/dist/produce/index.cjs +200 -0
- package/dist/produce/index.cjs.map +1 -0
- package/dist/produce/index.d.cts +3 -0
- package/dist/produce/index.d.ts +3 -0
- package/dist/produce/index.mjs +191 -0
- package/dist/produce/index.mjs.map +1 -0
- package/dist/scan/index.cjs +187 -0
- package/dist/scan/index.cjs.map +1 -0
- package/dist/scan/index.d.cts +1 -0
- package/dist/scan/index.d.ts +1 -0
- package/dist/scan/index.mjs +183 -0
- package/dist/scan/index.mjs.map +1 -0
- package/dist/sigh/index.cjs +203 -0
- package/dist/sigh/index.cjs.map +1 -0
- package/dist/sigh/index.d.cts +3 -0
- package/dist/sigh/index.d.ts +3 -0
- package/dist/sigh/index.mjs +198 -0
- package/dist/sigh/index.mjs.map +1 -0
- package/dist/snapshot/index.cjs +448 -0
- package/dist/snapshot/index.cjs.map +1 -0
- package/dist/snapshot/index.d.cts +1 -0
- package/dist/snapshot/index.d.ts +1 -0
- package/dist/snapshot/index.mjs +438 -0
- package/dist/snapshot/index.mjs.map +1 -0
- package/dist/trainer/index.cjs +395 -0
- package/dist/trainer/index.cjs.map +1 -0
- package/dist/trainer/index.d.cts +1 -0
- package/dist/trainer/index.d.ts +1 -0
- package/dist/trainer/index.mjs +372 -0
- package/dist/trainer/index.mjs.map +1 -0
- package/dist/xcode/index.cjs +188 -0
- package/dist/xcode/index.cjs.map +1 -0
- package/dist/xcode/index.d.cts +1 -0
- package/dist/xcode/index.d.ts +1 -0
- package/dist/xcode/index.mjs +176 -0
- package/dist/xcode/index.mjs.map +1 -0
- package/package.json +223 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/xcode/platform.ts","../../src/xcode/keychain.ts","../../src/xcode/project.ts","../../src/xcode/upload.ts"],"names":["promisify","execFile","randomBytes","join","homedir","mkdir","copyFile","execFileAsync","readFile","writeFile","mkdtemp","tmpdir","spawn","unlink"],"mappings":";;;;;;;;;;AAAO,SAAS,aAAa,OAAA,EAAuB;AAClD,EAAA,IAAI,OAAA,CAAQ,aAAa,QAAA,EAAU;AACjC,IAAA,MAAM,IAAI,KAAA;AAAA,MACR,CAAA,EAAG,OAAO,CAAA,yFAAA,EACoB,OAAA,CAAQ,QAAQ,CAAA,CAAA;AAAA,KAChD;AAAA,EACF;AACF;AAEO,SAAS,OAAA,GAA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OAAA,CAAQ,WAAW,KAAK,CAAA;AAAA,IAC1B,CAAC,CAAA;AAED,IAAA,KAAA,CAAM,MAAA,CAAO,EAAA,CAAG,MAAA,EAAQ,CAAC,IAAA,KAAiB;AACxC,MAAA,MAAM,KAAA,GAAQ,KAAK,QAAA,EAAS;AAC5B,MAAA,MAAA,IAAU,KAAA;AACV,MAAA,OAAA,CAAQ,WAAW,KAAK,CAAA;AAAA,IAC1B,CAAC,CAAA;AAED,IAAA,KAAA,CAAM,EAAA,CAAG,OAAA,EAAS,OAAO,IAAA,KAAS;AAChC,MAAA,IAAI,MAAA,EAAQ;AACV,QAAA,MAAM,UAAUT,SAAAA,CAAK,MAAA,EAAQ,CAAA,QAAA,EAAW,OAAA,CAAQ,QAAQ,CAAA,GAAA,CAAK,CAAA;AAC7D,QAAA,MAAMU,eAAAA,CAAO,OAAO,CAAA,CAAE,KAAA,CAAM,MAAM;AAAA,QAAC,CAAC,CAAA;AAAA,MACtC;AACA,MAAA,OAAA,CAAQ,EAAE,OAAA,EAAS,IAAA,KAAS,CAAA,EAAG,QAAQ,CAAA;AAAA,IACzC,CAAC,CAAA;AAAA,EACH,CAAC,CAAA;AACH","file":"index.cjs","sourcesContent":["export function requireMacOS(feature: string): void {\n if (process.platform !== \"darwin\") {\n throw new Error(\n `${feature} requires macOS. This operation uses Xcode command-line tools ` +\n `which are not available on ${process.platform}.`\n );\n }\n}\n\nexport function isMacOS(): boolean {\n return process.platform === \"darwin\";\n}\n","import { execFile } from \"node:child_process\";\nimport { promisify } from \"node:util\";\nimport { copyFile, mkdir, unlink } from \"node:fs/promises\";\nimport { join } from \"node:path\";\nimport { homedir } from \"node:os\";\nimport { randomBytes } from \"node:crypto\";\nimport { requireMacOS } from \"./platform.js\";\n\nconst execFileAsync = promisify(execFile);\n\nexport interface KeychainHandle {\n path: string;\n password: string;\n cleanup(): Promise<void>;\n}\n\nexport async function createKeychain(options: {\n name: string;\n password?: string;\n}): Promise<KeychainHandle> {\n requireMacOS(\"keychain\");\n\n const password = options.password ?? randomBytes(16).toString(\"hex\");\n const keychainName = `${options.name}.keychain-db`;\n const keychainPath = join(homedir(), \"Library\", \"Keychains\", keychainName);\n\n await execFileAsync(\"security\", [\"create-keychain\", \"-p\", password, keychainPath]);\n await execFileAsync(\"security\", [\"set-keychain-settings\", \"-lut\", \"21600\", keychainPath]);\n await execFileAsync(\"security\", [\"unlock-keychain\", \"-p\", password, keychainPath]);\n\n // Add to search list\n const { stdout: currentList } = await execFileAsync(\"security\", [\"list-keychains\", \"-d\", \"user\"]);\n const keychains = currentList.split(\"\\n\").map((k) => k.trim().replace(/\"/g, \"\")).filter(Boolean);\n const searchList = [keychainPath, ...keychains];\n if (!searchList.includes(\"/Library/Keychains/System.keychain\")) {\n searchList.push(\"/Library/Keychains/System.keychain\");\n }\n await execFileAsync(\"security\", [\"list-keychains\", \"-d\", \"user\", \"-s\", ...searchList]);\n\n // Download and import WWDR cert\n try {\n const wwdrPath = \"/tmp/AppleWWDRCAG3.cer\";\n await execFileAsync(\"curl\", [\"-sfo\", wwdrPath, \"https://www.apple.com/certificateauthority/AppleWWDRCAG3.cer\"]);\n await execFileAsync(\"security\", [\"import\", wwdrPath, \"-k\", keychainPath, \"-T\", \"/usr/bin/codesign\"]);\n } catch {\n // Non-fatal\n }\n\n return {\n path: keychainPath,\n password,\n cleanup: () => cleanupKeychain({ path: keychainPath, password, cleanup: async () => {} }),\n };\n}\n\nexport async function importCertificate(\n keychainPath: string,\n certPath: string,\n password?: string\n): Promise<void> {\n requireMacOS(\"keychain\");\n\n const isCer = certPath.endsWith(\".cer\") || certPath.endsWith(\".pem\");\n const args = isCer\n ? [\"import\", certPath, \"-k\", keychainPath, \"-T\", \"/usr/bin/codesign\", \"-T\", \"/usr/bin/security\"]\n : [\"import\", certPath, \"-k\", keychainPath, \"-P\", password ?? \"\", \"-T\", \"/usr/bin/codesign\", \"-T\", \"/usr/bin/security\"];\n\n try {\n await execFileAsync(\"security\", args);\n } catch (err: unknown) {\n const msg = err instanceof Error ? err.message : String(err);\n if (!msg.includes(\"already exists\")) throw err;\n }\n}\n\nexport async function installProfile(\n profilePath: string,\n uuid: string\n): Promise<string> {\n const profilesDir = join(homedir(), \"Library\", \"MobileDevice\", \"Provisioning Profiles\");\n await mkdir(profilesDir, { recursive: true });\n const dest = join(profilesDir, `${uuid}.mobileprovision`);\n await copyFile(profilePath, dest);\n return dest;\n}\n\nexport async function cleanupKeychain(handle: KeychainHandle): Promise<void> {\n try {\n await execFileAsync(\"security\", [\"delete-keychain\", handle.path]);\n } catch {\n // Keychain may already be deleted\n }\n}\n","import { execFile } from \"node:child_process\";\nimport { promisify } from \"node:util\";\nimport { readFile, writeFile } from \"node:fs/promises\";\nimport { requireMacOS } from \"./platform.js\";\n\nconst execFileAsync = promisify(execFile);\n\nexport async function updateSigningSettings(options: {\n projectPath: string;\n teamId: string;\n bundleIdentifier: string;\n codeSignIdentity: string;\n targets?: string[];\n profileName?: string;\n profileUuid?: string;\n automaticSigning?: boolean;\n}): Promise<void> {\n const pbxprojPath = `${options.projectPath}/project.pbxproj`;\n let content = await readFile(pbxprojPath, \"utf-8\");\n\n const style = options.automaticSigning ? \"Automatic\" : \"Manual\";\n\n // Replace build settings across the file\n content = replaceBuildSetting(content, \"CODE_SIGN_STYLE\", style);\n content = replaceBuildSetting(content, \"DEVELOPMENT_TEAM\", options.teamId);\n content = replaceBuildSetting(content, \"CODE_SIGN_IDENTITY\", options.codeSignIdentity);\n\n if (options.profileName) {\n content = replaceBuildSetting(content, \"PROVISIONING_PROFILE_SPECIFIER\", options.profileName);\n }\n if (options.profileUuid) {\n content = replaceBuildSetting(content, \"PROVISIONING_PROFILE\", options.profileUuid);\n }\n\n await writeFile(pbxprojPath, content);\n}\n\nexport async function setBuildNumber(\n projectPath: string,\n buildNumber: string\n): Promise<void> {\n const pbxprojPath = `${projectPath}/project.pbxproj`;\n let content = await readFile(pbxprojPath, \"utf-8\");\n content = replaceBuildSetting(content, \"CURRENT_PROJECT_VERSION\", buildNumber);\n await writeFile(pbxprojPath, content);\n}\n\nexport async function setVersionNumber(\n projectPath: string,\n version: string\n): Promise<void> {\n const pbxprojPath = `${projectPath}/project.pbxproj`;\n let content = await readFile(pbxprojPath, \"utf-8\");\n content = replaceBuildSetting(content, \"MARKETING_VERSION\", version);\n await writeFile(pbxprojPath, content);\n}\n\nexport async function readBuildSettings(options: {\n projectPath?: string;\n workspacePath?: string;\n scheme: string;\n configuration?: string;\n}): Promise<Record<string, string>> {\n requireMacOS(\"readBuildSettings\");\n\n const args = [\"-showBuildSettings\"];\n if (options.workspacePath) args.push(\"-workspace\", options.workspacePath);\n else if (options.projectPath) args.push(\"-project\", options.projectPath);\n args.push(\"-scheme\", options.scheme);\n if (options.configuration) args.push(\"-configuration\", options.configuration);\n\n const { stdout } = await execFileAsync(\"xcodebuild\", args);\n const settings: Record<string, string> = {};\n\n for (const line of stdout.split(\"\\n\")) {\n const match = line.match(/^\\s+(\\w+)\\s*=\\s*(.*)$/);\n if (match) {\n settings[match[1]] = match[2].trim();\n }\n }\n\n return settings;\n}\n\nfunction replaceBuildSetting(content: string, key: string, value: string): string {\n // Match: KEY = \"value\"; or KEY = value;\n // Use negative lookbehind to avoid partial matches (e.g., PROVISIONING_PROFILE vs _SPECIFIER)\n const regex = new RegExp(`(?<![A-Z_])(${key})\\\\s*=\\\\s*(\"[^\"]*\"|[^;]*);`, \"g\");\n // Quote value if it contains non-alphanumeric chars or if the original was quoted\n const needsQuotes = /[^A-Za-z0-9]/.test(value) || /\\s/.test(value);\n const quoted = needsQuotes ? `\"${value}\"` : value;\n return content.replace(regex, `$1 = ${quoted};`);\n}\n","import { spawn } from \"node:child_process\";\nimport { writeFile, unlink, mkdtemp } from \"node:fs/promises\";\nimport { join } from \"node:path\";\nimport { tmpdir } from \"node:os\";\nimport { requireMacOS } from \"./platform.js\";\n\nexport async function uploadWithAltool(options: {\n filePath: string;\n apiKeyId: string;\n apiIssuerId: string;\n apiPrivateKey?: string;\n apiKeyPath?: string;\n platform?: string;\n onOutput?: (chunk: string) => void;\n}): Promise<{ success: boolean; output: string }> {\n requireMacOS(\"altool upload\");\n\n // Write temp .p8 if private key content provided\n let keyDir: string | undefined;\n if (options.apiPrivateKey && !options.apiKeyPath) {\n keyDir = await mkdtemp(join(tmpdir(), \"fastnode-altool-\"));\n const keyPath = join(keyDir, `AuthKey_${options.apiKeyId}.p8`);\n await writeFile(keyPath, options.apiPrivateKey);\n }\n\n const args = [\n \"altool\",\n \"--upload-app\",\n \"-f\", options.filePath,\n \"-t\", options.platform ?? \"ios\",\n \"--apiKey\", options.apiKeyId,\n \"--apiIssuer\", options.apiIssuerId,\n ];\n\n const env = { ...process.env };\n if (keyDir) {\n env.API_PRIVATE_KEYS_DIR = keyDir;\n }\n\n return new Promise<{ success: boolean; output: string }>((resolve) => {\n const child = spawn(\"xcrun\", args, {\n env,\n stdio: [\"ignore\", \"pipe\", \"pipe\"],\n });\n\n let output = \"\";\n\n child.stdout.on(\"data\", (data: Buffer) => {\n const chunk = data.toString();\n output += chunk;\n options.onOutput?.(chunk);\n });\n\n child.stderr.on(\"data\", (data: Buffer) => {\n const chunk = data.toString();\n output += chunk;\n options.onOutput?.(chunk);\n });\n\n child.on(\"close\", async (code) => {\n if (keyDir) {\n const keyPath = join(keyDir, `AuthKey_${options.apiKeyId}.p8`);\n await unlink(keyPath).catch(() => {});\n }\n resolve({ success: code === 0, output });\n });\n });\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { K as KeychainHandle, e as cleanupKeychain, c as createKeychain, b as importCertificate, d as installProfile, a as isMacOS, g as readBuildSettings, r as requireMacOS, s as setBuildNumber, f as setVersionNumber, u as updateSigningSettings, h as uploadWithAltool } from '../index-Cp6cjtd-.cjs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { K as KeychainHandle, e as cleanupKeychain, c as createKeychain, b as importCertificate, d as installProfile, a as isMacOS, g as readBuildSettings, r as requireMacOS, s as setBuildNumber, f as setVersionNumber, u as updateSigningSettings, h as uploadWithAltool } from '../index-Cp6cjtd-.js';
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { execFile, spawn } from 'child_process';
|
|
2
|
+
import { promisify } from 'util';
|
|
3
|
+
import { mkdir, copyFile, readFile, writeFile, mkdtemp, unlink } from 'fs/promises';
|
|
4
|
+
import { join } from 'path';
|
|
5
|
+
import { homedir, tmpdir } from 'os';
|
|
6
|
+
import { randomBytes } from 'crypto';
|
|
7
|
+
|
|
8
|
+
// src/xcode/platform.ts
|
|
9
|
+
function requireMacOS(feature) {
|
|
10
|
+
if (process.platform !== "darwin") {
|
|
11
|
+
throw new Error(
|
|
12
|
+
`${feature} requires macOS. This operation uses Xcode command-line tools which are not available on ${process.platform}.`
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
function isMacOS() {
|
|
17
|
+
return process.platform === "darwin";
|
|
18
|
+
}
|
|
19
|
+
var execFileAsync = promisify(execFile);
|
|
20
|
+
async function createKeychain(options) {
|
|
21
|
+
requireMacOS("keychain");
|
|
22
|
+
const password = options.password ?? randomBytes(16).toString("hex");
|
|
23
|
+
const keychainName = `${options.name}.keychain-db`;
|
|
24
|
+
const keychainPath = join(homedir(), "Library", "Keychains", keychainName);
|
|
25
|
+
await execFileAsync("security", ["create-keychain", "-p", password, keychainPath]);
|
|
26
|
+
await execFileAsync("security", ["set-keychain-settings", "-lut", "21600", keychainPath]);
|
|
27
|
+
await execFileAsync("security", ["unlock-keychain", "-p", password, keychainPath]);
|
|
28
|
+
const { stdout: currentList } = await execFileAsync("security", ["list-keychains", "-d", "user"]);
|
|
29
|
+
const keychains = currentList.split("\n").map((k) => k.trim().replace(/"/g, "")).filter(Boolean);
|
|
30
|
+
const searchList = [keychainPath, ...keychains];
|
|
31
|
+
if (!searchList.includes("/Library/Keychains/System.keychain")) {
|
|
32
|
+
searchList.push("/Library/Keychains/System.keychain");
|
|
33
|
+
}
|
|
34
|
+
await execFileAsync("security", ["list-keychains", "-d", "user", "-s", ...searchList]);
|
|
35
|
+
try {
|
|
36
|
+
const wwdrPath = "/tmp/AppleWWDRCAG3.cer";
|
|
37
|
+
await execFileAsync("curl", ["-sfo", wwdrPath, "https://www.apple.com/certificateauthority/AppleWWDRCAG3.cer"]);
|
|
38
|
+
await execFileAsync("security", ["import", wwdrPath, "-k", keychainPath, "-T", "/usr/bin/codesign"]);
|
|
39
|
+
} catch {
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
path: keychainPath,
|
|
43
|
+
password,
|
|
44
|
+
cleanup: () => cleanupKeychain({ path: keychainPath, password, cleanup: async () => {
|
|
45
|
+
} })
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
async function importCertificate(keychainPath, certPath, password) {
|
|
49
|
+
requireMacOS("keychain");
|
|
50
|
+
const isCer = certPath.endsWith(".cer") || certPath.endsWith(".pem");
|
|
51
|
+
const args = isCer ? ["import", certPath, "-k", keychainPath, "-T", "/usr/bin/codesign", "-T", "/usr/bin/security"] : ["import", certPath, "-k", keychainPath, "-P", password ?? "", "-T", "/usr/bin/codesign", "-T", "/usr/bin/security"];
|
|
52
|
+
try {
|
|
53
|
+
await execFileAsync("security", args);
|
|
54
|
+
} catch (err) {
|
|
55
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
56
|
+
if (!msg.includes("already exists")) throw err;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
async function installProfile(profilePath, uuid) {
|
|
60
|
+
const profilesDir = join(homedir(), "Library", "MobileDevice", "Provisioning Profiles");
|
|
61
|
+
await mkdir(profilesDir, { recursive: true });
|
|
62
|
+
const dest = join(profilesDir, `${uuid}.mobileprovision`);
|
|
63
|
+
await copyFile(profilePath, dest);
|
|
64
|
+
return dest;
|
|
65
|
+
}
|
|
66
|
+
async function cleanupKeychain(handle) {
|
|
67
|
+
try {
|
|
68
|
+
await execFileAsync("security", ["delete-keychain", handle.path]);
|
|
69
|
+
} catch {
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
var execFileAsync2 = promisify(execFile);
|
|
73
|
+
async function updateSigningSettings(options) {
|
|
74
|
+
const pbxprojPath = `${options.projectPath}/project.pbxproj`;
|
|
75
|
+
let content = await readFile(pbxprojPath, "utf-8");
|
|
76
|
+
const style = options.automaticSigning ? "Automatic" : "Manual";
|
|
77
|
+
content = replaceBuildSetting(content, "CODE_SIGN_STYLE", style);
|
|
78
|
+
content = replaceBuildSetting(content, "DEVELOPMENT_TEAM", options.teamId);
|
|
79
|
+
content = replaceBuildSetting(content, "CODE_SIGN_IDENTITY", options.codeSignIdentity);
|
|
80
|
+
if (options.profileName) {
|
|
81
|
+
content = replaceBuildSetting(content, "PROVISIONING_PROFILE_SPECIFIER", options.profileName);
|
|
82
|
+
}
|
|
83
|
+
if (options.profileUuid) {
|
|
84
|
+
content = replaceBuildSetting(content, "PROVISIONING_PROFILE", options.profileUuid);
|
|
85
|
+
}
|
|
86
|
+
await writeFile(pbxprojPath, content);
|
|
87
|
+
}
|
|
88
|
+
async function setBuildNumber(projectPath, buildNumber) {
|
|
89
|
+
const pbxprojPath = `${projectPath}/project.pbxproj`;
|
|
90
|
+
let content = await readFile(pbxprojPath, "utf-8");
|
|
91
|
+
content = replaceBuildSetting(content, "CURRENT_PROJECT_VERSION", buildNumber);
|
|
92
|
+
await writeFile(pbxprojPath, content);
|
|
93
|
+
}
|
|
94
|
+
async function setVersionNumber(projectPath, version) {
|
|
95
|
+
const pbxprojPath = `${projectPath}/project.pbxproj`;
|
|
96
|
+
let content = await readFile(pbxprojPath, "utf-8");
|
|
97
|
+
content = replaceBuildSetting(content, "MARKETING_VERSION", version);
|
|
98
|
+
await writeFile(pbxprojPath, content);
|
|
99
|
+
}
|
|
100
|
+
async function readBuildSettings(options) {
|
|
101
|
+
requireMacOS("readBuildSettings");
|
|
102
|
+
const args = ["-showBuildSettings"];
|
|
103
|
+
if (options.workspacePath) args.push("-workspace", options.workspacePath);
|
|
104
|
+
else if (options.projectPath) args.push("-project", options.projectPath);
|
|
105
|
+
args.push("-scheme", options.scheme);
|
|
106
|
+
if (options.configuration) args.push("-configuration", options.configuration);
|
|
107
|
+
const { stdout } = await execFileAsync2("xcodebuild", args);
|
|
108
|
+
const settings = {};
|
|
109
|
+
for (const line of stdout.split("\n")) {
|
|
110
|
+
const match = line.match(/^\s+(\w+)\s*=\s*(.*)$/);
|
|
111
|
+
if (match) {
|
|
112
|
+
settings[match[1]] = match[2].trim();
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
return settings;
|
|
116
|
+
}
|
|
117
|
+
function replaceBuildSetting(content, key, value) {
|
|
118
|
+
const regex = new RegExp(`(?<![A-Z_])(${key})\\s*=\\s*("[^"]*"|[^;]*);`, "g");
|
|
119
|
+
const needsQuotes = /[^A-Za-z0-9]/.test(value) || /\s/.test(value);
|
|
120
|
+
const quoted = needsQuotes ? `"${value}"` : value;
|
|
121
|
+
return content.replace(regex, `$1 = ${quoted};`);
|
|
122
|
+
}
|
|
123
|
+
async function uploadWithAltool(options) {
|
|
124
|
+
requireMacOS("altool upload");
|
|
125
|
+
let keyDir;
|
|
126
|
+
if (options.apiPrivateKey && !options.apiKeyPath) {
|
|
127
|
+
keyDir = await mkdtemp(join(tmpdir(), "fastnode-altool-"));
|
|
128
|
+
const keyPath = join(keyDir, `AuthKey_${options.apiKeyId}.p8`);
|
|
129
|
+
await writeFile(keyPath, options.apiPrivateKey);
|
|
130
|
+
}
|
|
131
|
+
const args = [
|
|
132
|
+
"altool",
|
|
133
|
+
"--upload-app",
|
|
134
|
+
"-f",
|
|
135
|
+
options.filePath,
|
|
136
|
+
"-t",
|
|
137
|
+
options.platform ?? "ios",
|
|
138
|
+
"--apiKey",
|
|
139
|
+
options.apiKeyId,
|
|
140
|
+
"--apiIssuer",
|
|
141
|
+
options.apiIssuerId
|
|
142
|
+
];
|
|
143
|
+
const env = { ...process.env };
|
|
144
|
+
if (keyDir) {
|
|
145
|
+
env.API_PRIVATE_KEYS_DIR = keyDir;
|
|
146
|
+
}
|
|
147
|
+
return new Promise((resolve) => {
|
|
148
|
+
const child = spawn("xcrun", args, {
|
|
149
|
+
env,
|
|
150
|
+
stdio: ["ignore", "pipe", "pipe"]
|
|
151
|
+
});
|
|
152
|
+
let output = "";
|
|
153
|
+
child.stdout.on("data", (data) => {
|
|
154
|
+
const chunk = data.toString();
|
|
155
|
+
output += chunk;
|
|
156
|
+
options.onOutput?.(chunk);
|
|
157
|
+
});
|
|
158
|
+
child.stderr.on("data", (data) => {
|
|
159
|
+
const chunk = data.toString();
|
|
160
|
+
output += chunk;
|
|
161
|
+
options.onOutput?.(chunk);
|
|
162
|
+
});
|
|
163
|
+
child.on("close", async (code) => {
|
|
164
|
+
if (keyDir) {
|
|
165
|
+
const keyPath = join(keyDir, `AuthKey_${options.apiKeyId}.p8`);
|
|
166
|
+
await unlink(keyPath).catch(() => {
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
resolve({ success: code === 0, output });
|
|
170
|
+
});
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
export { cleanupKeychain, createKeychain, importCertificate, installProfile, isMacOS, readBuildSettings, requireMacOS, setBuildNumber, setVersionNumber, updateSigningSettings, uploadWithAltool };
|
|
175
|
+
//# sourceMappingURL=index.mjs.map
|
|
176
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/xcode/platform.ts","../../src/xcode/keychain.ts","../../src/xcode/project.ts","../../src/xcode/upload.ts"],"names":["execFileAsync","promisify","execFile","join","writeFile","unlink"],"mappings":";;;;;;;;AAAO,SAAS,aAAa,OAAA,EAAuB;AAClD,EAAA,IAAI,OAAA,CAAQ,aAAa,QAAA,EAAU;AACjC,IAAA,MAAM,IAAI,KAAA;AAAA,MACR,CAAA,EAAG,OAAO,CAAA,yFAAA,EACoB,OAAA,CAAQ,QAAQ,CAAA,CAAA;AAAA,KAChD;AAAA,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AAQ,WAAW,KAAK,CAAA;AAAA,IAC1B,CAAC,CAAA;AAED,IAAA,KAAA,CAAM,MAAA,CAAO,EAAA,CAAG,MAAA,EAAQ,CAAC,IAAA,KAAiB;AACxC,MAAA,MAAM,KAAA,GAAQ,KAAK,QAAA,EAAS;AAC5B,MAAA,MAAA,IAAU,KAAA;AACV,MAAA,OAAA,CAAQ,WAAW,KAAK,CAAA;AAAA,IAC1B,CAAC,CAAA;AAED,IAAA,KAAA,CAAM,EAAA,CAAG,OAAA,EAAS,OAAO,IAAA,KAAS;AAChC,MAAA,IAAI,MAAA,EAAQ;AACV,QAAA,MAAM,UAAUD,IAAAA,CAAK,MAAA,EAAQ,CAAA,QAAA,EAAW,OAAA,CAAQ,QAAQ,CAAA,GAAA,CAAK,CAAA;AAC7D,QAAA,MAAME,MAAAA,CAAO,OAAO,CAAA,CAAE,KAAA,CAAM,MAAM;AAAA,QAAC,CAAC,CAAA;AAAA,MACtC;AACA,MAAA,OAAA,CAAQ,EAAE,OAAA,EAAS,IAAA,KAAS,CAAA,EAAG,QAAQ,CAAA;AAAA,IACzC,CAAC,CAAA;AAAA,EACH,CAAC,CAAA;AACH","file":"index.mjs","sourcesContent":["export function requireMacOS(feature: string): void {\n if (process.platform !== \"darwin\") {\n throw new Error(\n `${feature} requires macOS. This operation uses Xcode command-line tools ` +\n `which are not available on ${process.platform}.`\n );\n }\n}\n\nexport function isMacOS(): boolean {\n return process.platform === \"darwin\";\n}\n","import { execFile } from \"node:child_process\";\nimport { promisify } from \"node:util\";\nimport { copyFile, mkdir, unlink } from \"node:fs/promises\";\nimport { join } from \"node:path\";\nimport { homedir } from \"node:os\";\nimport { randomBytes } from \"node:crypto\";\nimport { requireMacOS } from \"./platform.js\";\n\nconst execFileAsync = promisify(execFile);\n\nexport interface KeychainHandle {\n path: string;\n password: string;\n cleanup(): Promise<void>;\n}\n\nexport async function createKeychain(options: {\n name: string;\n password?: string;\n}): Promise<KeychainHandle> {\n requireMacOS(\"keychain\");\n\n const password = options.password ?? randomBytes(16).toString(\"hex\");\n const keychainName = `${options.name}.keychain-db`;\n const keychainPath = join(homedir(), \"Library\", \"Keychains\", keychainName);\n\n await execFileAsync(\"security\", [\"create-keychain\", \"-p\", password, keychainPath]);\n await execFileAsync(\"security\", [\"set-keychain-settings\", \"-lut\", \"21600\", keychainPath]);\n await execFileAsync(\"security\", [\"unlock-keychain\", \"-p\", password, keychainPath]);\n\n // Add to search list\n const { stdout: currentList } = await execFileAsync(\"security\", [\"list-keychains\", \"-d\", \"user\"]);\n const keychains = currentList.split(\"\\n\").map((k) => k.trim().replace(/\"/g, \"\")).filter(Boolean);\n const searchList = [keychainPath, ...keychains];\n if (!searchList.includes(\"/Library/Keychains/System.keychain\")) {\n searchList.push(\"/Library/Keychains/System.keychain\");\n }\n await execFileAsync(\"security\", [\"list-keychains\", \"-d\", \"user\", \"-s\", ...searchList]);\n\n // Download and import WWDR cert\n try {\n const wwdrPath = \"/tmp/AppleWWDRCAG3.cer\";\n await execFileAsync(\"curl\", [\"-sfo\", wwdrPath, \"https://www.apple.com/certificateauthority/AppleWWDRCAG3.cer\"]);\n await execFileAsync(\"security\", [\"import\", wwdrPath, \"-k\", keychainPath, \"-T\", \"/usr/bin/codesign\"]);\n } catch {\n // Non-fatal\n }\n\n return {\n path: keychainPath,\n password,\n cleanup: () => cleanupKeychain({ path: keychainPath, password, cleanup: async () => {} }),\n };\n}\n\nexport async function importCertificate(\n keychainPath: string,\n certPath: string,\n password?: string\n): Promise<void> {\n requireMacOS(\"keychain\");\n\n const isCer = certPath.endsWith(\".cer\") || certPath.endsWith(\".pem\");\n const args = isCer\n ? [\"import\", certPath, \"-k\", keychainPath, \"-T\", \"/usr/bin/codesign\", \"-T\", \"/usr/bin/security\"]\n : [\"import\", certPath, \"-k\", keychainPath, \"-P\", password ?? \"\", \"-T\", \"/usr/bin/codesign\", \"-T\", \"/usr/bin/security\"];\n\n try {\n await execFileAsync(\"security\", args);\n } catch (err: unknown) {\n const msg = err instanceof Error ? err.message : String(err);\n if (!msg.includes(\"already exists\")) throw err;\n }\n}\n\nexport async function installProfile(\n profilePath: string,\n uuid: string\n): Promise<string> {\n const profilesDir = join(homedir(), \"Library\", \"MobileDevice\", \"Provisioning Profiles\");\n await mkdir(profilesDir, { recursive: true });\n const dest = join(profilesDir, `${uuid}.mobileprovision`);\n await copyFile(profilePath, dest);\n return dest;\n}\n\nexport async function cleanupKeychain(handle: KeychainHandle): Promise<void> {\n try {\n await execFileAsync(\"security\", [\"delete-keychain\", handle.path]);\n } catch {\n // Keychain may already be deleted\n }\n}\n","import { execFile } from \"node:child_process\";\nimport { promisify } from \"node:util\";\nimport { readFile, writeFile } from \"node:fs/promises\";\nimport { requireMacOS } from \"./platform.js\";\n\nconst execFileAsync = promisify(execFile);\n\nexport async function updateSigningSettings(options: {\n projectPath: string;\n teamId: string;\n bundleIdentifier: string;\n codeSignIdentity: string;\n targets?: string[];\n profileName?: string;\n profileUuid?: string;\n automaticSigning?: boolean;\n}): Promise<void> {\n const pbxprojPath = `${options.projectPath}/project.pbxproj`;\n let content = await readFile(pbxprojPath, \"utf-8\");\n\n const style = options.automaticSigning ? \"Automatic\" : \"Manual\";\n\n // Replace build settings across the file\n content = replaceBuildSetting(content, \"CODE_SIGN_STYLE\", style);\n content = replaceBuildSetting(content, \"DEVELOPMENT_TEAM\", options.teamId);\n content = replaceBuildSetting(content, \"CODE_SIGN_IDENTITY\", options.codeSignIdentity);\n\n if (options.profileName) {\n content = replaceBuildSetting(content, \"PROVISIONING_PROFILE_SPECIFIER\", options.profileName);\n }\n if (options.profileUuid) {\n content = replaceBuildSetting(content, \"PROVISIONING_PROFILE\", options.profileUuid);\n }\n\n await writeFile(pbxprojPath, content);\n}\n\nexport async function setBuildNumber(\n projectPath: string,\n buildNumber: string\n): Promise<void> {\n const pbxprojPath = `${projectPath}/project.pbxproj`;\n let content = await readFile(pbxprojPath, \"utf-8\");\n content = replaceBuildSetting(content, \"CURRENT_PROJECT_VERSION\", buildNumber);\n await writeFile(pbxprojPath, content);\n}\n\nexport async function setVersionNumber(\n projectPath: string,\n version: string\n): Promise<void> {\n const pbxprojPath = `${projectPath}/project.pbxproj`;\n let content = await readFile(pbxprojPath, \"utf-8\");\n content = replaceBuildSetting(content, \"MARKETING_VERSION\", version);\n await writeFile(pbxprojPath, content);\n}\n\nexport async function readBuildSettings(options: {\n projectPath?: string;\n workspacePath?: string;\n scheme: string;\n configuration?: string;\n}): Promise<Record<string, string>> {\n requireMacOS(\"readBuildSettings\");\n\n const args = [\"-showBuildSettings\"];\n if (options.workspacePath) args.push(\"-workspace\", options.workspacePath);\n else if (options.projectPath) args.push(\"-project\", options.projectPath);\n args.push(\"-scheme\", options.scheme);\n if (options.configuration) args.push(\"-configuration\", options.configuration);\n\n const { stdout } = await execFileAsync(\"xcodebuild\", args);\n const settings: Record<string, string> = {};\n\n for (const line of stdout.split(\"\\n\")) {\n const match = line.match(/^\\s+(\\w+)\\s*=\\s*(.*)$/);\n if (match) {\n settings[match[1]] = match[2].trim();\n }\n }\n\n return settings;\n}\n\nfunction replaceBuildSetting(content: string, key: string, value: string): string {\n // Match: KEY = \"value\"; or KEY = value;\n // Use negative lookbehind to avoid partial matches (e.g., PROVISIONING_PROFILE vs _SPECIFIER)\n const regex = new RegExp(`(?<![A-Z_])(${key})\\\\s*=\\\\s*(\"[^\"]*\"|[^;]*);`, \"g\");\n // Quote value if it contains non-alphanumeric chars or if the original was quoted\n const needsQuotes = /[^A-Za-z0-9]/.test(value) || /\\s/.test(value);\n const quoted = needsQuotes ? `\"${value}\"` : value;\n return content.replace(regex, `$1 = ${quoted};`);\n}\n","import { spawn } from \"node:child_process\";\nimport { writeFile, unlink, mkdtemp } from \"node:fs/promises\";\nimport { join } from \"node:path\";\nimport { tmpdir } from \"node:os\";\nimport { requireMacOS } from \"./platform.js\";\n\nexport async function uploadWithAltool(options: {\n filePath: string;\n apiKeyId: string;\n apiIssuerId: string;\n apiPrivateKey?: string;\n apiKeyPath?: string;\n platform?: string;\n onOutput?: (chunk: string) => void;\n}): Promise<{ success: boolean; output: string }> {\n requireMacOS(\"altool upload\");\n\n // Write temp .p8 if private key content provided\n let keyDir: string | undefined;\n if (options.apiPrivateKey && !options.apiKeyPath) {\n keyDir = await mkdtemp(join(tmpdir(), \"fastnode-altool-\"));\n const keyPath = join(keyDir, `AuthKey_${options.apiKeyId}.p8`);\n await writeFile(keyPath, options.apiPrivateKey);\n }\n\n const args = [\n \"altool\",\n \"--upload-app\",\n \"-f\", options.filePath,\n \"-t\", options.platform ?? \"ios\",\n \"--apiKey\", options.apiKeyId,\n \"--apiIssuer\", options.apiIssuerId,\n ];\n\n const env = { ...process.env };\n if (keyDir) {\n env.API_PRIVATE_KEYS_DIR = keyDir;\n }\n\n return new Promise<{ success: boolean; output: string }>((resolve) => {\n const child = spawn(\"xcrun\", args, {\n env,\n stdio: [\"ignore\", \"pipe\", \"pipe\"],\n });\n\n let output = \"\";\n\n child.stdout.on(\"data\", (data: Buffer) => {\n const chunk = data.toString();\n output += chunk;\n options.onOutput?.(chunk);\n });\n\n child.stderr.on(\"data\", (data: Buffer) => {\n const chunk = data.toString();\n output += chunk;\n options.onOutput?.(chunk);\n });\n\n child.on(\"close\", async (code) => {\n if (keyDir) {\n const keyPath = join(keyDir, `AuthKey_${options.apiKeyId}.p8`);\n await unlink(keyPath).catch(() => {});\n }\n resolve({ success: code === 0, output });\n });\n });\n}\n"]}
|
package/package.json
ADDED
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@sitepong/fastnode",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "A complete Node.js/TypeScript port of Fastlane — iOS & Android build automation, code signing, and app distribution",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.cjs",
|
|
7
|
+
"module": "dist/index.mjs",
|
|
8
|
+
"types": "dist/index.d.ts",
|
|
9
|
+
"bin": {
|
|
10
|
+
"fastnode": "./bin/fastnode.js"
|
|
11
|
+
},
|
|
12
|
+
"publishConfig": {
|
|
13
|
+
"access": "public"
|
|
14
|
+
},
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "git+https://github.com/programmrz/sitepong.git",
|
|
18
|
+
"directory": "packages/fastnode"
|
|
19
|
+
},
|
|
20
|
+
"homepage": "https://github.com/programmrz/sitepong/tree/main/packages/fastnode#readme",
|
|
21
|
+
"bugs": {
|
|
22
|
+
"url": "https://github.com/programmrz/sitepong/issues"
|
|
23
|
+
},
|
|
24
|
+
"exports": {
|
|
25
|
+
".": {
|
|
26
|
+
"types": "./dist/index.d.ts",
|
|
27
|
+
"import": "./dist/index.mjs",
|
|
28
|
+
"require": "./dist/index.cjs"
|
|
29
|
+
},
|
|
30
|
+
"./client": {
|
|
31
|
+
"types": "./dist/client/index.d.ts",
|
|
32
|
+
"import": "./dist/client/index.mjs",
|
|
33
|
+
"require": "./dist/client/index.cjs"
|
|
34
|
+
},
|
|
35
|
+
"./cert": {
|
|
36
|
+
"types": "./dist/cert/index.d.ts",
|
|
37
|
+
"import": "./dist/cert/index.mjs",
|
|
38
|
+
"require": "./dist/cert/index.cjs"
|
|
39
|
+
},
|
|
40
|
+
"./sigh": {
|
|
41
|
+
"types": "./dist/sigh/index.d.ts",
|
|
42
|
+
"import": "./dist/sigh/index.mjs",
|
|
43
|
+
"require": "./dist/sigh/index.cjs"
|
|
44
|
+
},
|
|
45
|
+
"./match": {
|
|
46
|
+
"types": "./dist/match/index.d.ts",
|
|
47
|
+
"import": "./dist/match/index.mjs",
|
|
48
|
+
"require": "./dist/match/index.cjs"
|
|
49
|
+
},
|
|
50
|
+
"./produce": {
|
|
51
|
+
"types": "./dist/produce/index.d.ts",
|
|
52
|
+
"import": "./dist/produce/index.mjs",
|
|
53
|
+
"require": "./dist/produce/index.cjs"
|
|
54
|
+
},
|
|
55
|
+
"./pilot": {
|
|
56
|
+
"types": "./dist/pilot/index.d.ts",
|
|
57
|
+
"import": "./dist/pilot/index.mjs",
|
|
58
|
+
"require": "./dist/pilot/index.cjs"
|
|
59
|
+
},
|
|
60
|
+
"./deliver": {
|
|
61
|
+
"types": "./dist/deliver/index.d.ts",
|
|
62
|
+
"import": "./dist/deliver/index.mjs",
|
|
63
|
+
"require": "./dist/deliver/index.cjs"
|
|
64
|
+
},
|
|
65
|
+
"./pem": {
|
|
66
|
+
"types": "./dist/pem/index.d.ts",
|
|
67
|
+
"import": "./dist/pem/index.mjs",
|
|
68
|
+
"require": "./dist/pem/index.cjs"
|
|
69
|
+
},
|
|
70
|
+
"./gym": {
|
|
71
|
+
"types": "./dist/gym/index.d.ts",
|
|
72
|
+
"import": "./dist/gym/index.mjs",
|
|
73
|
+
"require": "./dist/gym/index.cjs"
|
|
74
|
+
},
|
|
75
|
+
"./scan": {
|
|
76
|
+
"types": "./dist/scan/index.d.ts",
|
|
77
|
+
"import": "./dist/scan/index.mjs",
|
|
78
|
+
"require": "./dist/scan/index.cjs"
|
|
79
|
+
},
|
|
80
|
+
"./snapshot": {
|
|
81
|
+
"types": "./dist/snapshot/index.d.ts",
|
|
82
|
+
"import": "./dist/snapshot/index.mjs",
|
|
83
|
+
"require": "./dist/snapshot/index.cjs"
|
|
84
|
+
},
|
|
85
|
+
"./trainer": {
|
|
86
|
+
"types": "./dist/trainer/index.d.ts",
|
|
87
|
+
"import": "./dist/trainer/index.mjs",
|
|
88
|
+
"require": "./dist/trainer/index.cjs"
|
|
89
|
+
},
|
|
90
|
+
"./precheck": {
|
|
91
|
+
"types": "./dist/precheck/index.d.ts",
|
|
92
|
+
"import": "./dist/precheck/index.mjs",
|
|
93
|
+
"require": "./dist/precheck/index.cjs"
|
|
94
|
+
},
|
|
95
|
+
"./frameit": {
|
|
96
|
+
"types": "./dist/frameit/index.d.ts",
|
|
97
|
+
"import": "./dist/frameit/index.mjs",
|
|
98
|
+
"require": "./dist/frameit/index.cjs"
|
|
99
|
+
},
|
|
100
|
+
"./xcode": {
|
|
101
|
+
"types": "./dist/xcode/index.d.ts",
|
|
102
|
+
"import": "./dist/xcode/index.mjs",
|
|
103
|
+
"require": "./dist/xcode/index.cjs"
|
|
104
|
+
},
|
|
105
|
+
"./actions": {
|
|
106
|
+
"types": "./dist/actions/index.d.ts",
|
|
107
|
+
"import": "./dist/actions/index.mjs",
|
|
108
|
+
"require": "./dist/actions/index.cjs"
|
|
109
|
+
},
|
|
110
|
+
"./lane": {
|
|
111
|
+
"types": "./dist/lane/index.d.ts",
|
|
112
|
+
"import": "./dist/lane/index.mjs",
|
|
113
|
+
"require": "./dist/lane/index.cjs"
|
|
114
|
+
},
|
|
115
|
+
"./core": {
|
|
116
|
+
"types": "./dist/core/index.d.ts",
|
|
117
|
+
"import": "./dist/core/index.mjs",
|
|
118
|
+
"require": "./dist/core/index.cjs"
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
"typesVersions": {
|
|
122
|
+
"*": {
|
|
123
|
+
"client": [
|
|
124
|
+
"./dist/client/index.d.ts"
|
|
125
|
+
],
|
|
126
|
+
"cert": [
|
|
127
|
+
"./dist/cert/index.d.ts"
|
|
128
|
+
],
|
|
129
|
+
"sigh": [
|
|
130
|
+
"./dist/sigh/index.d.ts"
|
|
131
|
+
],
|
|
132
|
+
"match": [
|
|
133
|
+
"./dist/match/index.d.ts"
|
|
134
|
+
],
|
|
135
|
+
"produce": [
|
|
136
|
+
"./dist/produce/index.d.ts"
|
|
137
|
+
],
|
|
138
|
+
"pilot": [
|
|
139
|
+
"./dist/pilot/index.d.ts"
|
|
140
|
+
],
|
|
141
|
+
"deliver": [
|
|
142
|
+
"./dist/deliver/index.d.ts"
|
|
143
|
+
],
|
|
144
|
+
"pem": [
|
|
145
|
+
"./dist/pem/index.d.ts"
|
|
146
|
+
],
|
|
147
|
+
"gym": [
|
|
148
|
+
"./dist/gym/index.d.ts"
|
|
149
|
+
],
|
|
150
|
+
"scan": [
|
|
151
|
+
"./dist/scan/index.d.ts"
|
|
152
|
+
],
|
|
153
|
+
"snapshot": [
|
|
154
|
+
"./dist/snapshot/index.d.ts"
|
|
155
|
+
],
|
|
156
|
+
"trainer": [
|
|
157
|
+
"./dist/trainer/index.d.ts"
|
|
158
|
+
],
|
|
159
|
+
"precheck": [
|
|
160
|
+
"./dist/precheck/index.d.ts"
|
|
161
|
+
],
|
|
162
|
+
"frameit": [
|
|
163
|
+
"./dist/frameit/index.d.ts"
|
|
164
|
+
],
|
|
165
|
+
"xcode": [
|
|
166
|
+
"./dist/xcode/index.d.ts"
|
|
167
|
+
],
|
|
168
|
+
"actions": [
|
|
169
|
+
"./dist/actions/index.d.ts"
|
|
170
|
+
],
|
|
171
|
+
"lane": [
|
|
172
|
+
"./dist/lane/index.d.ts"
|
|
173
|
+
],
|
|
174
|
+
"core": [
|
|
175
|
+
"./dist/core/index.d.ts"
|
|
176
|
+
]
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
"files": [
|
|
180
|
+
"dist",
|
|
181
|
+
"bin"
|
|
182
|
+
],
|
|
183
|
+
"scripts": {
|
|
184
|
+
"build": "tsup",
|
|
185
|
+
"dev": "tsup --watch",
|
|
186
|
+
"typecheck": "tsc --noEmit",
|
|
187
|
+
"test": "vitest run",
|
|
188
|
+
"test:watch": "vitest",
|
|
189
|
+
"prepublishOnly": "npm run build"
|
|
190
|
+
},
|
|
191
|
+
"keywords": [
|
|
192
|
+
"fastlane",
|
|
193
|
+
"ios",
|
|
194
|
+
"android",
|
|
195
|
+
"code-signing",
|
|
196
|
+
"testflight",
|
|
197
|
+
"app-store",
|
|
198
|
+
"provisioning",
|
|
199
|
+
"certificates",
|
|
200
|
+
"xcode",
|
|
201
|
+
"build-automation"
|
|
202
|
+
],
|
|
203
|
+
"author": "SitePong",
|
|
204
|
+
"license": "MIT",
|
|
205
|
+
"engines": {
|
|
206
|
+
"node": ">=20.0.0"
|
|
207
|
+
},
|
|
208
|
+
"dependencies": {
|
|
209
|
+
"@peculiar/x509": "^1.12.3",
|
|
210
|
+
"commander": "^13.1.0",
|
|
211
|
+
"emoji-regex": "^10.3.0",
|
|
212
|
+
"jose": "^6.0.11",
|
|
213
|
+
"plist": "^3.1.0"
|
|
214
|
+
},
|
|
215
|
+
"devDependencies": {
|
|
216
|
+
"@types/node": "^20.10.0",
|
|
217
|
+
"@types/plist": "^3.0.5",
|
|
218
|
+
"@vitest/coverage-v8": "^1.6.1",
|
|
219
|
+
"tsup": "^8.0.1",
|
|
220
|
+
"typescript": "^5.7.2",
|
|
221
|
+
"vitest": "^1.0.0"
|
|
222
|
+
}
|
|
223
|
+
}
|