squidcloudctl 1.1.1 → 1.1.2
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/dist/auth-revoke-I5FM6N2S.js +2 -0
- package/dist/{auth-revoke-HLVWIF5D.js.map → auth-revoke-I5FM6N2S.js.map} +1 -1
- package/dist/bin/squidcloud.js +2 -2
- package/dist/bin/squidcloud.js.map +1 -1
- package/dist/chunk-FYFPDKJM.js +3 -0
- package/dist/chunk-FYFPDKJM.js.map +1 -0
- package/dist/collab-invite-HAMMPEAQ.js +2 -0
- package/dist/{collab-invite-OYD63R6K.js.map → collab-invite-HAMMPEAQ.js.map} +1 -1
- package/dist/collab-leave-MTCXHQ4T.js +2 -0
- package/dist/{collab-leave-ZGMFXTNZ.js.map → collab-leave-MTCXHQ4T.js.map} +1 -1
- package/dist/collab-remove-DO4BIA5R.js +2 -0
- package/dist/{collab-remove-SGBXHV6I.js.map → collab-remove-DO4BIA5R.js.map} +1 -1
- package/dist/collab-transfer-6CG5PHVC.js +2 -0
- package/dist/{collab-transfer-QBRVUOBP.js.map → collab-transfer-6CG5PHVC.js.map} +1 -1
- package/dist/deploy-X5HX7V4J.js +3 -0
- package/dist/{deploy-MHRZLVMJ.js.map → deploy-X5HX7V4J.js.map} +1 -1
- package/dist/forms-clear-UJ23UHUN.js +2 -0
- package/dist/{forms-clear-6WHRCNPC.js.map → forms-clear-UJ23UHUN.js.map} +1 -1
- package/dist/forms-create-CWC7MGOJ.js +2 -0
- package/dist/{forms-create-XRPPYHZO.js.map → forms-create-CWC7MGOJ.js.map} +1 -1
- package/dist/forms-delete-TKHTM6L5.js +2 -0
- package/dist/{forms-delete-A2BUAQO2.js.map → forms-delete-TKHTM6L5.js.map} +1 -1
- package/dist/forms-export-5ZNEL3V2.js +2 -0
- package/dist/{forms-export-4MHCOTS6.js.map → forms-export-5ZNEL3V2.js.map} +1 -1
- package/dist/login-SO6BZ4HE.js +2 -0
- package/dist/{login-GCEZPBFD.js.map → login-SO6BZ4HE.js.map} +1 -1
- package/dist/logout-QERO6G6B.js +2 -0
- package/dist/{logout-GJEJPKYX.js.map → logout-QERO6G6B.js.map} +1 -1
- package/dist/logs-export-DYOPV2LT.js +2 -0
- package/dist/{logs-export-FXA6DZEO.js.map → logs-export-DYOPV2LT.js.map} +1 -1
- package/dist/scripts-cancel-JS3LL2AT.js +2 -0
- package/dist/{scripts-cancel-JKTVOSXG.js.map → scripts-cancel-JS3LL2AT.js.map} +1 -1
- package/dist/scripts-delete-274TW63X.js +2 -0
- package/dist/{scripts-delete-6YNN6RF6.js.map → scripts-delete-274TW63X.js.map} +1 -1
- package/dist/scripts-disable-JPATOVO4.js +2 -0
- package/dist/{scripts-disable-2FYBEM24.js.map → scripts-disable-JPATOVO4.js.map} +1 -1
- package/dist/scripts-enable-JVAA6AMP.js +2 -0
- package/dist/{scripts-enable-2HSUEYEM.js.map → scripts-enable-JVAA6AMP.js.map} +1 -1
- package/dist/scripts-logs-VISO5ONQ.js +2 -0
- package/dist/{scripts-logs-K5MJAH3Z.js.map → scripts-logs-VISO5ONQ.js.map} +1 -1
- package/dist/scripts-run-3NBYKEMQ.js +2 -0
- package/dist/{scripts-run-AWP7H6UI.js.map → scripts-run-3NBYKEMQ.js.map} +1 -1
- package/dist/scripts-status-45K3IL5L.js +2 -0
- package/dist/{scripts-status-7IJPY6QO.js.map → scripts-status-45K3IL5L.js.map} +1 -1
- package/dist/scripts-validate-JZPIIMIX.js +2 -0
- package/dist/{scripts-validate-JHR2DJ32.js.map → scripts-validate-JZPIIMIX.js.map} +1 -1
- package/dist/sign-cancel-OUJM5UZT.js +2 -0
- package/dist/{sign-cancel-22HQBKO6.js.map → sign-cancel-OUJM5UZT.js.map} +1 -1
- package/dist/sign-download-FS5G6J27.js +2 -0
- package/dist/{sign-download-RZZHSB4G.js.map → sign-download-FS5G6J27.js.map} +1 -1
- package/dist/sign-request-VVFYWT3Y.js +2 -0
- package/dist/{sign-request-ZZ56TFWA.js.map → sign-request-VVFYWT3Y.js.map} +1 -1
- package/dist/sign-status-LKG5UFBX.js +2 -0
- package/dist/{sign-status-MTI7RHMA.js.map → sign-status-LKG5UFBX.js.map} +1 -1
- package/dist/sign-verify-CVTTJSDL.js +2 -0
- package/dist/{sign-verify-SBNMGCHK.js.map → sign-verify-CVTTJSDL.js.map} +1 -1
- package/dist/sites-delete-SUHEQDZQ.js +2 -0
- package/dist/{sites-delete-S7CXJJCT.js.map → sites-delete-SUHEQDZQ.js.map} +1 -1
- package/dist/sites-purge-VHERQRUB.js +2 -0
- package/dist/{sites-purge-4QCZZVJV.js.map → sites-purge-VHERQRUB.js.map} +1 -1
- package/dist/sites-rename-MOO6HVW3.js +2 -0
- package/dist/{sites-rename-LIXOOMUC.js.map → sites-rename-MOO6HVW3.js.map} +1 -1
- package/dist/sites-rollback-SPW2Z73L.js +2 -0
- package/dist/{sites-rollback-SQ3E7LSP.js.map → sites-rollback-SPW2Z73L.js.map} +1 -1
- package/dist/sites-unpublish-6P7SQGIU.js +2 -0
- package/dist/{sites-unpublish-UA2XWIF7.js.map → sites-unpublish-6P7SQGIU.js.map} +1 -1
- package/dist/sites-visibility-R3AQJ76F.js +2 -0
- package/dist/{sites-visibility-X7PYVHRW.js.map → sites-visibility-R3AQJ76F.js.map} +1 -1
- package/dist/storage-cat-HXFOJJG5.js +2 -0
- package/dist/{storage-cat-EHO2BMPK.js.map → storage-cat-HXFOJJG5.js.map} +1 -1
- package/dist/storage-clean-LEQEYWL6.js +2 -0
- package/dist/{storage-clean-7KB4IA23.js.map → storage-clean-LEQEYWL6.js.map} +1 -1
- package/dist/storage-cp-JTPTXZRQ.js +2 -0
- package/dist/{storage-cp-H6NP57DI.js.map → storage-cp-JTPTXZRQ.js.map} +1 -1
- package/dist/storage-diff-XURHVTPC.js +2 -0
- package/dist/{storage-diff-ZGYG6KTC.js.map → storage-diff-XURHVTPC.js.map} +1 -1
- package/dist/storage-download-5OYCNXKL.js +3 -0
- package/dist/{storage-download-33DJ3N6Q.js.map → storage-download-5OYCNXKL.js.map} +1 -1
- package/dist/storage-mkdir-NWOHGAQI.js +2 -0
- package/dist/{storage-mkdir-FGUEME4R.js.map → storage-mkdir-NWOHGAQI.js.map} +1 -1
- package/dist/storage-mv-XQ7EPX3M.js +2 -0
- package/dist/{storage-mv-WW6GNDH4.js.map → storage-mv-XQ7EPX3M.js.map} +1 -1
- package/dist/storage-rm-LYO6UR3G.js +2 -0
- package/dist/{storage-rm-IGU66LQK.js.map → storage-rm-LYO6UR3G.js.map} +1 -1
- package/dist/storage-share-OURRQWZK.js +2 -0
- package/dist/{storage-share-VB47GSYV.js.map → storage-share-OURRQWZK.js.map} +1 -1
- package/dist/storage-tag-NGJGUJSZ.js +2 -0
- package/dist/{storage-tag-Q4TX5KKI.js.map → storage-tag-NGJGUJSZ.js.map} +1 -1
- package/dist/storage-unshare-3DXEKHEH.js +2 -0
- package/dist/{storage-unshare-R7LPIUEA.js.map → storage-unshare-3DXEKHEH.js.map} +1 -1
- package/dist/storage-upload-5M6PBHOC.js +2 -0
- package/dist/{storage-upload-KGMLZLWU.js.map → storage-upload-5M6PBHOC.js.map} +1 -1
- package/dist/time-lock-2OLEVQPJ.js +2 -0
- package/dist/{time-lock-GK7D7RKH.js.map → time-lock-2OLEVQPJ.js.map} +1 -1
- package/dist/time-proof-RUTDAEKP.js +2 -0
- package/dist/{time-proof-PT44FO2Q.js.map → time-proof-RUTDAEKP.js.map} +1 -1
- package/dist/time-unlock-OO6QH5R6.js +2 -0
- package/dist/{time-unlock-UARQCXPS.js.map → time-unlock-OO6QH5R6.js.map} +1 -1
- package/dist/update-XJQSXSFU.js +2 -0
- package/dist/{update-IYMIV34T.js.map → update-XJQSXSFU.js.map} +1 -1
- package/dist/version-LHSDYI7Q.js +2 -0
- package/dist/version-LHSDYI7Q.js.map +1 -0
- package/package.json +1 -1
- package/dist/auth-revoke-HLVWIF5D.js +0 -2
- package/dist/chunk-6TS5Y27A.js +0 -6
- package/dist/chunk-6TS5Y27A.js.map +0 -1
- package/dist/chunk-ON3YIMVG.js +0 -2
- package/dist/chunk-ON3YIMVG.js.map +0 -1
- package/dist/collab-invite-OYD63R6K.js +0 -2
- package/dist/collab-leave-ZGMFXTNZ.js +0 -2
- package/dist/collab-remove-SGBXHV6I.js +0 -2
- package/dist/collab-transfer-QBRVUOBP.js +0 -2
- package/dist/deploy-MHRZLVMJ.js +0 -3
- package/dist/forms-clear-6WHRCNPC.js +0 -2
- package/dist/forms-create-XRPPYHZO.js +0 -2
- package/dist/forms-delete-A2BUAQO2.js +0 -2
- package/dist/forms-export-4MHCOTS6.js +0 -2
- package/dist/login-GCEZPBFD.js +0 -2
- package/dist/logout-GJEJPKYX.js +0 -2
- package/dist/logs-export-FXA6DZEO.js +0 -2
- package/dist/scripts-cancel-JKTVOSXG.js +0 -2
- package/dist/scripts-delete-6YNN6RF6.js +0 -2
- package/dist/scripts-disable-2FYBEM24.js +0 -2
- package/dist/scripts-enable-2HSUEYEM.js +0 -2
- package/dist/scripts-logs-K5MJAH3Z.js +0 -2
- package/dist/scripts-run-AWP7H6UI.js +0 -2
- package/dist/scripts-status-7IJPY6QO.js +0 -2
- package/dist/scripts-validate-JHR2DJ32.js +0 -2
- package/dist/sign-cancel-22HQBKO6.js +0 -2
- package/dist/sign-download-RZZHSB4G.js +0 -2
- package/dist/sign-request-ZZ56TFWA.js +0 -2
- package/dist/sign-status-MTI7RHMA.js +0 -2
- package/dist/sign-verify-SBNMGCHK.js +0 -2
- package/dist/sites-delete-S7CXJJCT.js +0 -2
- package/dist/sites-purge-4QCZZVJV.js +0 -2
- package/dist/sites-rename-LIXOOMUC.js +0 -2
- package/dist/sites-rollback-SQ3E7LSP.js +0 -2
- package/dist/sites-unpublish-UA2XWIF7.js +0 -2
- package/dist/sites-visibility-X7PYVHRW.js +0 -2
- package/dist/storage-cat-EHO2BMPK.js +0 -2
- package/dist/storage-clean-7KB4IA23.js +0 -2
- package/dist/storage-cp-H6NP57DI.js +0 -2
- package/dist/storage-diff-ZGYG6KTC.js +0 -2
- package/dist/storage-download-33DJ3N6Q.js +0 -3
- package/dist/storage-mkdir-FGUEME4R.js +0 -2
- package/dist/storage-mv-WW6GNDH4.js +0 -2
- package/dist/storage-rm-IGU66LQK.js +0 -2
- package/dist/storage-share-VB47GSYV.js +0 -2
- package/dist/storage-tag-Q4TX5KKI.js +0 -2
- package/dist/storage-unshare-R7LPIUEA.js +0 -2
- package/dist/storage-upload-KGMLZLWU.js +0 -2
- package/dist/time-lock-GK7D7RKH.js +0 -2
- package/dist/time-proof-PT44FO2Q.js +0 -2
- package/dist/time-unlock-UARQCXPS.js +0 -2
- package/dist/update-IYMIV34T.js +0 -2
- package/dist/version-7IHVNLWY.js +0 -2
- package/dist/version-7IHVNLWY.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/lib/deploy/detector.ts","../src/commands/deploy/index.ts"],"names":["detectProject","targetPath","resolved","path","stat","fs","walk","dir","entries","entry","fullPath","totalFiles","htmlFiles","hasIndexHtml","f","deploy","target","options","deployPath","spinner","createSpinner","project","logError","logWarn","deployOptions","isAllowedFile","allowedFiles","ignoredFiles","progressBar","cliProgress","chalk","formData","uploadedCount","filePath","relativePath","content","blob","result","apiPost","siteUrl","clipboard","isJsonMode","logJSON","logSuccess","copied","muted","err"],"mappings":"2YAaA,eAAsBA,CAAAA,CAAcC,EAA8C,CAChF,IAAMC,CAAAA,CAAWC,CAAAA,CAAK,OAAA,CAAQF,CAAU,CAAA,CAClCG,CAAAA,CAAOC,EAAG,QAAA,CAASH,CAAQ,CAAA,CAEjC,GAAIE,CAAAA,CAAK,MAAA,EAAO,CAEd,OADYD,EAAK,OAAA,CAAQD,CAAQ,CAAA,CAAE,WAAA,EAAY,GACnC,OAAA,CACH,CACL,IAAA,CAAM,cACN,QAAA,CAAUA,CAAAA,CACV,YAAA,CAAc,IAAA,CACd,SAAA,CAAW,CAACA,CAAQ,CAAA,CACpB,WAAY,CACd,CA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,OAAA,CAAQ,IAAI,CAAA,EAAA,EAAKb,CAAAA,CAAM,GAAA,CAAI,SAAS,CAAA,CAAES,CAAO,CAAC,CAAA,CAAA,EAAIK,EAAO,EAAE,CAAC,CAAA,CAAE,CAAA,CAC1DP,CAAAA,CAAO,UAAA,EACT,OAAA,CAAQ,GAAA,CAAI,KAAKQ,CAAAA,CAAM,CAAA,EAAGR,CAAAA,CAAO,UAAU,CAAA,YAAA,EAAYA,CAAAA,CAAO,cAAc,CAAA,EAAA,CAAI,CAAC,CAAA,CAAE,EAEvF,CAAA,MAASS,CAAAA,CAAK,CACZ,MAAA3B,CAAAA,CAAQ,IAAA,EAAK,CACP2B,CACR,CACF","file":"deploy-MHRZLVMJ.js","sourcesContent":["import fs from 'node:fs'\nimport path from 'node:path'\n\nexport type DeployType = 'single-file' | 'codebase' | 'invalid'\n\nexport interface DetectedProject {\n type: DeployType\n rootPath: string\n hasIndexHtml: boolean\n htmlFiles: string[]\n totalFiles: number\n}\n\nexport async function detectProject(targetPath: string): Promise<DetectedProject> {\n const resolved = path.resolve(targetPath)\n const stat = fs.statSync(resolved)\n\n if (stat.isFile()) {\n const ext = path.extname(resolved).toLowerCase()\n if (ext === '.html') {\n return {\n type: 'single-file',\n rootPath: resolved,\n hasIndexHtml: true,\n htmlFiles: [resolved],\n totalFiles: 1,\n }\n }\n return { type: 'invalid', rootPath: resolved, hasIndexHtml: false, htmlFiles: [], totalFiles: 0 }\n }\n\n if (stat.isDirectory()) {\n const htmlFiles: string[] = []\n let totalFiles = 0\n\n function walk(dir: string): void {\n const entries = fs.readdirSync(dir, { withFileTypes: true })\n for (const entry of entries) {\n const fullPath = path.join(dir, entry.name)\n if (entry.isDirectory()) {\n if (!entry.name.startsWith('.') && entry.name !== 'node_modules') {\n walk(fullPath)\n }\n } else if (entry.isFile()) {\n totalFiles++\n if (entry.name.endsWith('.html')) {\n htmlFiles.push(fullPath)\n }\n }\n }\n }\n\n walk(resolved)\n\n if (htmlFiles.length === 0) {\n return { type: 'invalid', rootPath: resolved, hasIndexHtml: false, htmlFiles: [], totalFiles }\n }\n\n const hasIndexHtml = htmlFiles.some(f => path.basename(f).toLowerCase() === 'index.html')\n\n return {\n type: 'codebase',\n rootPath: resolved,\n hasIndexHtml,\n htmlFiles,\n totalFiles,\n }\n }\n\n return { type: 'invalid', rootPath: resolved, hasIndexHtml: false, htmlFiles: [], totalFiles: 0 }\n}\n","import path from 'node:path'\nimport fs from 'node:fs'\nimport { detectProject, isAllowedFile } from '../../lib/deploy/index.js'\nimport { apiPost, apiUpload } from '../../lib/api/client.js'\nimport { createSpinner } from '../../lib/output/spinner.js'\nimport { logSuccess, logError, logInfo, logJSON, logWarn } from '../../lib/output/logger.js'\nimport { isJsonMode } from '../../lib/output/logger.js'\nimport { formatBytes } from '../../lib/utils/format.js'\nimport clipboard from 'clipboardy'\nimport chalk from 'chalk'\nimport { copied, muted } from '../../lib/output/brand.js'\nimport cliProgress from 'cli-progress'\n\nexport default async function deploy(target?: string, options?: {\n name?: string\n env?: string\n preview?: boolean\n noWait?: boolean\n force?: boolean\n output?: string\n}): Promise<void> {\n const deployPath = target ? path.resolve(target) : process.cwd()\n\n const spinner = createSpinner('Analyzing project...')\n spinner.start()\n\n const project = await detectProject(deployPath)\n\n if (project.type === 'invalid') {\n spinner.fail()\n logError(`No deployable content found at ${deployPath}. Provide an HTML file or folder containing HTML files.`)\n process.exit(1)\n }\n\n if (project.type === 'codebase' && !project.hasIndexHtml) {\n spinner.warn()\n logWarn('No index.html found at root. Scanning one level deep for entry point...')\n }\n\n spinner.text = 'Uploading files...'\n\n const deployOptions: Record<string, unknown> = {\n source: deployPath,\n type: project.type,\n slug: options?.name,\n environment: options?.env || (options?.preview ? 'preview' : 'production'),\n force: options?.force || false,\n }\n\n if (project.type === 'codebase') {\n const files: { path: string; content: string }[] = []\n const allowedFiles: string[] = []\n const ignoredFiles: string[] = []\n\n function walk(dir: string): void {\n const entries = fs.readdirSync(dir, { withFileTypes: true })\n for (const entry of entries) {\n const fullPath = path.join(dir, entry.name)\n if (entry.isDirectory()) {\n if (!entry.name.startsWith('.') && entry.name !== 'node_modules') {\n walk(fullPath)\n }\n } else if (entry.isFile()) {\n if (isAllowedFile(entry.name)) {\n allowedFiles.push(fullPath)\n } else {\n ignoredFiles.push(fullPath)\n }\n }\n }\n }\n\n walk(project.rootPath)\n\n if (!options?.force && project.type === 'codebase') {\n spinner.text = 'Computing diff...'\n }\n\n const progressBar = new cliProgress.SingleBar({\n format: `${chalk.hex('#7C4DFF')('▸')} Uploading |${chalk.hex('#7C4DFF')('{bar}')}| {percentage}% | {value}/{total} files | {speed}`,\n barCompleteChar: '█',\n barIncompleteChar: '░',\n hideCursor: true,\n })\n\n progressBar.start(allowedFiles.length, 0)\n\n const formData = new FormData()\n let uploadedCount = 0\n\n for (const filePath of allowedFiles) {\n const relativePath = path.relative(project.rootPath, filePath)\n const content = fs.readFileSync(filePath)\n const blob = new Blob([content])\n formData.append('files', blob, relativePath)\n uploadedCount++\n progressBar.update(uploadedCount)\n }\n\n progressBar.stop()\n spinner.stop()\n\n deployOptions.files = formData\n }\n\n if (project.type === 'single-file') {\n const content = fs.readFileSync(project.rootPath, 'utf-8')\n deployOptions.htmlContent = content\n }\n\n spinner.text = 'Deploying to SquidCloud...'\n spinner.start()\n\n try {\n const result = await apiPost<{\n url: string\n deploy_id: string\n file_count: number\n deploy_time_ms: number\n }>('/api/v1/deploy', deployOptions, { authenticated: true })\n\n spinner.succeed()\n\n const siteUrl = result.url || `https://squidcloud.vercel.app/sites/${options?.name || result.deploy_id}`\n\n try {\n await clipboard.write(siteUrl)\n } catch {\n // clipboard not available\n }\n\n if (isJsonMode()) {\n logJSON(result)\n return\n }\n\n logSuccess(`Deployed successfully!`)\n console.log(` ${chalk.hex('#4FC3F7')(siteUrl)} ${copied('')}`)\n if (result.file_count) {\n console.log(` ${muted(`${result.file_count} files · ${result.deploy_time_ms}ms`)}`)\n }\n } catch (err) {\n spinner.fail()\n throw err\n }\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/lib/deploy/detector.ts","../src/commands/deploy/index.ts"],"names":["detectProject","targetPath","resolved","path","stat","fs","walk","dir","entries","entry","fullPath","totalFiles","htmlFiles","hasIndexHtml","f","deploy","target","options","deployPath","spinner","createSpinner","project","logError","logWarn","deployOptions","isAllowedFile","allowedFiles","ignoredFiles","progressBar","cliProgress","chalk","formData","uploadedCount","filePath","relativePath","content","blob","result","apiPost","siteUrl","clipboard","isJsonMode","logJSON","logSuccess","copied","muted","err"],"mappings":"+WAaA,eAAsBA,CAAAA,CAAcC,EAA8C,CAChF,IAAMC,CAAAA,CAAWC,CAAAA,CAAK,OAAA,CAAQF,CAAU,CAAA,CAClCG,CAAAA,CAAOC,EAAG,QAAA,CAASH,CAAQ,CAAA,CAEjC,GAAIE,CAAAA,CAAK,MAAA,EAAO,CAEd,OADYD,EAAK,OAAA,CAAQD,CAAQ,CAAA,CAAE,WAAA,EAAY,GACnC,OAAA,CACH,CACL,IAAA,CAAM,cACN,QAAA,CAAUA,CAAAA,CACV,YAAA,CAAc,IAAA,CACd,SAAA,CAAW,CAACA,CAAQ,CAAA,CACpB,WAAY,CACd,CAAA,CAEK,CAAE,IAAA,CAAM,SAAA,CAAW,QAAA,CAAUA,CAAAA,CAAU,YAAA,CAAc,MAAO,SAAA,CAAW,EAAC,CAAG,UAAA,CAAY,CAAE,CAAA,CAGlG,GAAIE,CAAAA,CAAK,aAAY,CAAG,CAItB,IAASE,CAAAA,CAAT,SAAcC,CAAAA,CAAmB,CAC/B,IAAMC,EAAUH,CAAAA,CAAG,WAAA,CAAYE,CAAAA,CAAK,CAAE,aAAA,CAAe,IAAK,CAAC,CAAA,CAC3D,QAAWE,CAAAA,IAASD,CAAAA,CAAS,CAC3B,IAAME,CAAAA,CAAWP,CAAAA,CAAK,IAAA,CAAKI,CAAAA,CAAKE,EAAM,IAAI,CAAA,CACtCA,CAAAA,CAAM,WAAA,EAAY,CAChB,CAACA,CAAAA,CAAM,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'single-file' | 'codebase' | 'invalid'\n\nexport interface DetectedProject {\n type: DeployType\n rootPath: string\n hasIndexHtml: boolean\n htmlFiles: string[]\n totalFiles: number\n}\n\nexport async function detectProject(targetPath: string): Promise<DetectedProject> {\n const resolved = path.resolve(targetPath)\n const stat = fs.statSync(resolved)\n\n if (stat.isFile()) {\n const ext = path.extname(resolved).toLowerCase()\n if (ext === '.html') {\n return {\n type: 'single-file',\n rootPath: resolved,\n hasIndexHtml: true,\n htmlFiles: [resolved],\n totalFiles: 1,\n }\n }\n return { type: 'invalid', rootPath: resolved, hasIndexHtml: false, htmlFiles: [], totalFiles: 0 }\n }\n\n if (stat.isDirectory()) {\n const htmlFiles: string[] = []\n let totalFiles = 0\n\n function walk(dir: string): void {\n const entries = fs.readdirSync(dir, { withFileTypes: true })\n for (const entry of entries) {\n const fullPath = path.join(dir, entry.name)\n if (entry.isDirectory()) {\n if (!entry.name.startsWith('.') && entry.name !== 'node_modules') {\n walk(fullPath)\n }\n } else if (entry.isFile()) {\n totalFiles++\n if (entry.name.endsWith('.html')) {\n htmlFiles.push(fullPath)\n }\n }\n }\n }\n\n walk(resolved)\n\n if (htmlFiles.length === 0) {\n return { type: 'invalid', rootPath: resolved, hasIndexHtml: false, htmlFiles: [], totalFiles }\n }\n\n const hasIndexHtml = htmlFiles.some(f => path.basename(f).toLowerCase() === 'index.html')\n\n return {\n type: 'codebase',\n rootPath: resolved,\n hasIndexHtml,\n htmlFiles,\n totalFiles,\n }\n }\n\n return { type: 'invalid', rootPath: resolved, hasIndexHtml: false, htmlFiles: [], totalFiles: 0 }\n}\n","import path from 'node:path'\nimport fs from 'node:fs'\nimport { detectProject, isAllowedFile } from '../../lib/deploy/index.js'\nimport { apiPost, apiUpload } from '../../lib/api/client.js'\nimport { createSpinner } from '../../lib/output/spinner.js'\nimport { logSuccess, logError, logInfo, logJSON, logWarn } from '../../lib/output/logger.js'\nimport { isJsonMode } from '../../lib/output/logger.js'\nimport { formatBytes } from '../../lib/utils/format.js'\nimport clipboard from 'clipboardy'\nimport chalk from 'chalk'\nimport { copied, muted } from '../../lib/output/brand.js'\nimport cliProgress from 'cli-progress'\n\nexport default async function deploy(target?: string, options?: {\n name?: string\n env?: string\n preview?: boolean\n noWait?: boolean\n force?: boolean\n output?: string\n}): Promise<void> {\n const deployPath = target ? path.resolve(target) : process.cwd()\n\n const spinner = createSpinner('Analyzing project...')\n spinner.start()\n\n const project = await detectProject(deployPath)\n\n if (project.type === 'invalid') {\n spinner.fail()\n logError(`No deployable content found at ${deployPath}. Provide an HTML file or folder containing HTML files.`)\n process.exit(1)\n }\n\n if (project.type === 'codebase' && !project.hasIndexHtml) {\n spinner.warn()\n logWarn('No index.html found at root. Scanning one level deep for entry point...')\n }\n\n spinner.text = 'Uploading files...'\n\n const deployOptions: Record<string, unknown> = {\n source: deployPath,\n type: project.type,\n slug: options?.name,\n environment: options?.env || (options?.preview ? 'preview' : 'production'),\n force: options?.force || false,\n }\n\n if (project.type === 'codebase') {\n const files: { path: string; content: string }[] = []\n const allowedFiles: string[] = []\n const ignoredFiles: string[] = []\n\n function walk(dir: string): void {\n const entries = fs.readdirSync(dir, { withFileTypes: true })\n for (const entry of entries) {\n const fullPath = path.join(dir, entry.name)\n if (entry.isDirectory()) {\n if (!entry.name.startsWith('.') && entry.name !== 'node_modules') {\n walk(fullPath)\n }\n } else if (entry.isFile()) {\n if (isAllowedFile(entry.name)) {\n allowedFiles.push(fullPath)\n } else {\n ignoredFiles.push(fullPath)\n }\n }\n }\n }\n\n walk(project.rootPath)\n\n if (!options?.force && project.type === 'codebase') {\n spinner.text = 'Computing diff...'\n }\n\n const progressBar = new cliProgress.SingleBar({\n format: `${chalk.hex('#7C4DFF')('▸')} Uploading |${chalk.hex('#7C4DFF')('{bar}')}| {percentage}% | {value}/{total} files | {speed}`,\n barCompleteChar: '█',\n barIncompleteChar: '░',\n hideCursor: true,\n })\n\n progressBar.start(allowedFiles.length, 0)\n\n const formData = new FormData()\n let uploadedCount = 0\n\n for (const filePath of allowedFiles) {\n const relativePath = path.relative(project.rootPath, filePath)\n const content = fs.readFileSync(filePath)\n const blob = new Blob([content])\n formData.append('files', blob, relativePath)\n uploadedCount++\n progressBar.update(uploadedCount)\n }\n\n progressBar.stop()\n spinner.stop()\n\n deployOptions.files = formData\n }\n\n if (project.type === 'single-file') {\n const content = fs.readFileSync(project.rootPath, 'utf-8')\n deployOptions.htmlContent = content\n }\n\n spinner.text = 'Deploying to SquidCloud...'\n spinner.start()\n\n try {\n const result = await apiPost<{\n url: string\n deploy_id: string\n file_count: number\n deploy_time_ms: number\n }>('/api/v1/deploy', deployOptions, { authenticated: true })\n\n spinner.succeed()\n\n const siteUrl = result.url || `https://squidcloud.vercel.app/sites/${options?.name || result.deploy_id}`\n\n try {\n await clipboard.write(siteUrl)\n } catch {\n // clipboard not available\n }\n\n if (isJsonMode()) {\n logJSON(result)\n return\n }\n\n logSuccess(`Deployed successfully!`)\n console.log(` ${chalk.hex('#4FC3F7')(siteUrl)} ${copied('')}`)\n if (result.file_count) {\n console.log(` ${muted(`${result.file_count} files · ${result.deploy_time_ms}ms`)}`)\n }\n } catch (err) {\n spinner.fail()\n throw err\n }\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {b}from'./chunk-FYFPDKJM.js';import {g}from'./chunk-BC2OVPRV.js';import'./chunk-NDB6KXYI.js';import'./chunk-THMWE2I6.js';import {g as g$1}from'./chunk-QT7R3AXE.js';import'./chunk-4NTVRCZM.js';import n from'inquirer';async function m(o){let{confirm:t}=await n.prompt([{type:"confirm",name:"confirm",message:"Delete ALL submissions for this file request? This cannot be undone.",default:false}]);if(!t)return;let e=b("Clearing submissions...");e.start(),await g(`/api/v1/forms/${o}/submissions`,{authenticated:true}),e.succeed(),g$1("All submissions cleared");}export{m as default};//# sourceMappingURL=forms-clear-UJ23UHUN.js.map
|
|
2
|
+
//# sourceMappingURL=forms-clear-UJ23UHUN.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/commands/forms/forms-clear.ts"],"names":["formsClear","id","confirm","inquirer","spinner","createSpinner","apiDelete","logSuccess"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/commands/forms/forms-clear.ts"],"names":["formsClear","id","confirm","inquirer","spinner","createSpinner","apiDelete","logSuccess"],"mappings":"+NAKA,eAAOA,CAAAA,CAAkCC,CAAAA,CAA2B,CAClE,GAAM,CAAE,OAAA,CAAAC,CAAQ,CAAA,CAAI,MAAMC,EAAS,MAAA,CAAO,CAAC,CACzC,IAAA,CAAM,SAAA,CACN,IAAA,CAAM,SAAA,CACN,OAAA,CAAS,sEAAA,CACT,OAAA,CAAS,KACX,CAAC,CAAC,CAAA,CACF,GAAI,CAACD,CAAAA,CAAS,OACd,IAAME,CAAAA,CAAUC,CAAAA,CAAc,yBAAyB,CAAA,CACvDD,CAAAA,CAAQ,KAAA,EAAM,CACd,MAAME,CAAAA,CAAU,iBAAiBL,CAAE,CAAA,YAAA,CAAA,CAAgB,CAAE,aAAA,CAAe,IAAK,CAAC,CAAA,CAC1EG,CAAAA,CAAQ,OAAA,EAAQ,CAChBG,GAAAA,CAAW,yBAAyB,EACtC","file":"forms-clear-UJ23UHUN.js","sourcesContent":["import inquirer from 'inquirer'\nimport { apiDelete } from '../../lib/api/client.js'\nimport { createSpinner } from '../../lib/output/spinner.js'\nimport { logSuccess } from '../../lib/output/logger.js'\n\nexport default async function formsClear(id: string): Promise<void> {\n const { confirm } = await inquirer.prompt([{\n type: 'confirm',\n name: 'confirm',\n message: 'Delete ALL submissions for this file request? This cannot be undone.',\n default: false,\n }])\n if (!confirm) return\n const spinner = createSpinner('Clearing submissions...')\n spinner.start()\n await apiDelete(`/api/v1/forms/${id}/submissions`, { authenticated: true })\n spinner.succeed()\n logSuccess('All submissions cleared')\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {b}from'./chunk-FYFPDKJM.js';import {e}from'./chunk-BC2OVPRV.js';import'./chunk-NDB6KXYI.js';import'./chunk-THMWE2I6.js';import {f,m,g}from'./chunk-QT7R3AXE.js';import'./chunk-4NTVRCZM.js';async function a(r,c){let e$1=b(`Creating file request "${r}"...`);e$1.start();let t=await e("/api/v1/forms",{name:r,folder:c?.folder},{authenticated:true});if(e$1.succeed(),f()){m(t);return}g(`File request "${r}" created (${t.id.slice(0,8)})`);}export{a as default};//# sourceMappingURL=forms-create-CWC7MGOJ.js.map
|
|
2
|
+
//# sourceMappingURL=forms-create-CWC7MGOJ.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/commands/forms/forms-create.ts"],"names":["formsCreate","name","options","spinner","createSpinner","result","apiPost","isJsonMode","logJSON","logSuccess"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/commands/forms/forms-create.ts"],"names":["formsCreate","name","options","spinner","createSpinner","result","apiPost","isJsonMode","logJSON","logSuccess"],"mappings":"oMAKA,eAAOA,CAAAA,CAAmCC,CAAAA,CAAcC,CAAAA,CAA8C,CACpG,IAAMC,IAAUC,CAAAA,CAAc,CAAA,uBAAA,EAA0BH,CAAI,CAAA,IAAA,CAAM,CAAA,CAClEE,GAAAA,CAAQ,OAAM,CACd,IAAME,CAAAA,CAAS,MAAMC,CAAAA,CAAqC,eAAA,CAAiB,CACzE,IAAA,CAAAL,CAAAA,CACA,MAAA,CAAQC,CAAAA,EAAS,MACnB,CAAA,CAAG,CAAE,cAAe,IAAK,CAAC,CAAA,CAG1B,GAFAC,GAAAA,CAAQ,OAAA,GAEJI,CAAAA,EAAW,CAAG,CAChBC,CAAAA,CAAQH,CAAM,CAAA,CACd,MACF,CACAI,CAAAA,CAAW,CAAA,cAAA,EAAiBR,CAAI,CAAA,WAAA,EAAcI,CAAAA,CAAO,EAAA,CAAG,KAAA,CAAM,CAAA,CAAG,CAAC,CAAC,CAAA,CAAA,CAAG,EACxE","file":"forms-create-CWC7MGOJ.js","sourcesContent":["import { apiPost } from '../../lib/api/client.js'\nimport { createSpinner } from '../../lib/output/spinner.js'\nimport { logSuccess, logJSON } from '../../lib/output/logger.js'\nimport { isJsonMode } from '../../lib/output/logger.js'\n\nexport default async function formsCreate(name: string, options?: { folder?: string }): Promise<void> {\n const spinner = createSpinner(`Creating file request \"${name}\"...`)\n spinner.start()\n const result = await apiPost<{ id: string; url: string }>('/api/v1/forms', {\n name,\n folder: options?.folder,\n }, { authenticated: true })\n spinner.succeed()\n\n if (isJsonMode()) {\n logJSON(result)\n return\n }\n logSuccess(`File request \"${name}\" created (${result.id.slice(0, 8)})`)\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {b}from'./chunk-FYFPDKJM.js';import {g}from'./chunk-BC2OVPRV.js';import'./chunk-NDB6KXYI.js';import'./chunk-THMWE2I6.js';import {g as g$1}from'./chunk-QT7R3AXE.js';import'./chunk-4NTVRCZM.js';import s from'inquirer';async function p(t){let e=(await(await import('./client-RFYERFWZ.js')).apiGet(`/api/v1/forms/${t}`,{authenticated:true})).form.name,{confirm:o}=await s.prompt([{type:"input",name:"confirm",message:`Type "${e}" to permanently delete this file request and all submissions:`,validate:m=>m===e?true:"Type the exact name to confirm"}]);if(o!==e)return;let r=b("Deleting file request...");r.start(),await g(`/api/v1/forms/${t}`,{authenticated:true}),r.succeed(),g$1(`File request "${e}" deleted`);}export{p as default};//# sourceMappingURL=forms-delete-TKHTM6L5.js.map
|
|
2
|
+
//# sourceMappingURL=forms-delete-TKHTM6L5.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/commands/forms/forms-delete.ts"],"names":["formsDelete","id","formName","confirm","inquirer","v","spinner","createSpinner","apiDelete","logSuccess"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/commands/forms/forms-delete.ts"],"names":["formsDelete","id","formName","confirm","inquirer","v","spinner","createSpinner","apiDelete","logSuccess"],"mappings":"+NAKA,eAAOA,CAAAA,CAAmCC,CAAAA,CAA2B,CAEnE,IAAMC,CAAAA,CAAAA,CADO,KAAA,CAAO,aAAa,sBAAyB,CAAA,EAAG,MAAA,CAAmC,CAAA,cAAA,EAAiBD,CAAE,CAAA,CAAA,CAAI,CAAE,aAAA,CAAe,IAAK,CAAC,CAAA,EACxH,IAAA,CAAK,IAAA,CAErB,CAAE,QAAAE,CAAQ,CAAA,CAAI,MAAMC,CAAAA,CAAS,OAAO,CAAC,CACzC,KAAM,OAAA,CACN,IAAA,CAAM,UACN,OAAA,CAAS,CAAA,MAAA,EAASF,CAAQ,CAAA,8DAAA,CAAA,CAC1B,SAAWG,CAAAA,EAAcA,CAAAA,GAAMH,CAAAA,CAAW,IAAA,CAAO,gCACnD,CAAC,CAAC,CAAA,CACF,GAAIC,IAAYD,CAAAA,CAAU,OAE1B,IAAMI,CAAAA,CAAUC,CAAAA,CAAc,0BAA0B,CAAA,CACxDD,CAAAA,CAAQ,KAAA,EAAM,CACd,MAAME,CAAAA,CAAU,CAAA,cAAA,EAAiBP,CAAE,CAAA,CAAA,CAAI,CAAE,aAAA,CAAe,IAAK,CAAC,CAAA,CAC9DK,EAAQ,OAAA,EAAQ,CAChBG,IAAW,CAAA,cAAA,EAAiBP,CAAQ,WAAW,EACjD","file":"forms-delete-TKHTM6L5.js","sourcesContent":["import inquirer from 'inquirer'\nimport { apiDelete } from '../../lib/api/client.js'\nimport { createSpinner } from '../../lib/output/spinner.js'\nimport { logSuccess } from '../../lib/output/logger.js'\n\nexport default async function formsDelete(id: string): Promise<void> {\n const data = await (await import('../../lib/api/client.js')).apiGet<{ form: { name: string } }>(`/api/v1/forms/${id}`, { authenticated: true })\n const formName = data.form.name\n\n const { confirm } = await inquirer.prompt([{\n type: 'input',\n name: 'confirm',\n message: `Type \"${formName}\" to permanently delete this file request and all submissions:`,\n validate: (v: string) => v === formName ? true : 'Type the exact name to confirm',\n }])\n if (confirm !== formName) return\n\n const spinner = createSpinner('Deleting file request...')\n spinner.start()\n await apiDelete(`/api/v1/forms/${id}`, { authenticated: true })\n spinner.succeed()\n logSuccess(`File request \"${formName}\" deleted`)\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {b}from'./chunk-FYFPDKJM.js';import {d}from'./chunk-BC2OVPRV.js';import'./chunk-NDB6KXYI.js';import'./chunk-THMWE2I6.js';import {g}from'./chunk-QT7R3AXE.js';import'./chunk-4NTVRCZM.js';import n from'fs';import p from'path';async function m(t){let o=b("Exporting submissions...");o.start();let c=await d(`/api/v1/forms/${t}/export`,{authenticated:true});o.succeed();let s=p.join(process.cwd(),`filereq-${t.slice(0,8)}-submissions.csv`);n.writeFileSync(s,c.csv,"utf-8"),g(`Exported to ${s}`);}export{m as default};//# sourceMappingURL=forms-export-5ZNEL3V2.js.map
|
|
2
|
+
//# sourceMappingURL=forms-export-5ZNEL3V2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/commands/forms/forms-export.ts"],"names":["formsExport","id","spinner","createSpinner","data","apiGet","filePath","path","fs","logSuccess"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/commands/forms/forms-export.ts"],"names":["formsExport","id","spinner","createSpinner","data","apiGet","filePath","path","fs","logSuccess"],"mappings":"sOAMA,eAAOA,CAAAA,CAAmCC,CAAAA,CAA2B,CACnE,IAAMC,CAAAA,CAAUC,CAAAA,CAAc,0BAA0B,CAAA,CACxDD,CAAAA,CAAQ,KAAA,EAAM,CACd,IAAME,CAAAA,CAAO,MAAMC,CAAAA,CAAwB,CAAA,cAAA,EAAiBJ,CAAE,CAAA,OAAA,CAAA,CAAW,CAAE,aAAA,CAAe,IAAK,CAAC,CAAA,CAChGC,EAAQ,OAAA,EAAQ,CAChB,IAAMI,CAAAA,CAAWC,CAAAA,CAAK,IAAA,CAAK,OAAA,CAAQ,GAAA,EAAI,CAAG,CAAA,QAAA,EAAWN,CAAAA,CAAG,KAAA,CAAM,CAAA,CAAG,CAAC,CAAC,CAAA,gBAAA,CAAkB,CAAA,CACrFO,CAAAA,CAAG,aAAA,CAAcF,CAAAA,CAAUF,CAAAA,CAAK,GAAA,CAAK,OAAO,CAAA,CAC5CK,CAAAA,CAAW,CAAA,YAAA,EAAeH,CAAQ,CAAA,CAAE,EACtC","file":"forms-export-5ZNEL3V2.js","sourcesContent":["import fs from 'node:fs'\nimport path from 'node:path'\nimport { apiGet } from '../../lib/api/client.js'\nimport { createSpinner } from '../../lib/output/spinner.js'\nimport { logSuccess } from '../../lib/output/logger.js'\n\nexport default async function formsExport(id: string): Promise<void> {\n const spinner = createSpinner('Exporting submissions...')\n spinner.start()\n const data = await apiGet<{ csv: string }>(`/api/v1/forms/${id}/export`, { authenticated: true })\n spinner.succeed()\n const filePath = path.join(process.cwd(), `filereq-${id.slice(0, 8)}-submissions.csv`)\n fs.writeFileSync(filePath, data.csv, 'utf-8')\n logSuccess(`Exported to ${filePath}`)\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {b,a}from'./chunk-FYFPDKJM.js';import {e}from'./chunk-BC2OVPRV.js';import'./chunk-NDB6KXYI.js';import'./chunk-THMWE2I6.js';import {j,k,a as a$1,g}from'./chunk-QT7R3AXE.js';import {m,a as a$2,b as b$1,c as c$1,j as j$1,k as k$1,d,h,e as e$1,f as f$1,g as g$1,n}from'./chunk-4NTVRCZM.js';import C from'inquirer';import f from'os';import {blake3}from'@noble/hashes/blake3';function c(r){r.fill(0);}var M=process.env.SQUIDCLOUD_SERVER_PUB_KEY||"",l=null,i=null,t=null,p=null;async function N(r,u){let{pub:s,priv:e$2}=a$2();l=e$2,i=s,t=b$1(),p=c$1(u,r);let d$1=j$1(blake3(f.hostname()+f.platform()+f.arch())),g=Date.now(),o=await e("/api/auth/ssp/hello",{email:r,password_proof:j$1(p),client_ephemeral_pub:j$1(i),client_nonce:j$1(t),device_fingerprint:d$1,timestamp:g}),S=k$1(o.server_nonce),F=k$1(o.server_ephemeral_pub),H=k$1(o.server_signature),v=k$1(M);if(v.length>0){let j=d(t,S,i,g);if(!await h(H,j,v))throw I(),new Error("Connection rejected \u2014 server identity could not be verified")}let V=e$1(F,l),$=f$1(V,t,S),D=k$1(o.encrypted_session),O=k$1(o.session_iv),Y=k$1(o.session_tag),m=g$1(D,O,Y,$);return m.device_fingerprint=d$1,await n(m),I(),m}function I(){l&&c(l),i&&c(i),t&&c(t),p&&c(p),l=null,i=null,t=null,p=null;}async function Q(){let r=await m();if(r){j(`Already authenticated as ${r.user.email}`);let{force:e}=await C.prompt([{type:"confirm",name:"force",message:"Re-authenticate?",default:false}]);if(!e)return}let u=await C.prompt([{type:"input",name:"email",message:"Email:",validate:e=>e.includes("@")?true:"Please enter a valid email"},{type:"password",name:"password",message:"Password:",mask:"*"}]),s=b("Authenticating with SquidCloud...");s.start();try{let e=await N(u.email,u.password);s.succeed(),console.log(a()),k(`Welcome to SquidCloud, ${a$1(e.user.username)}!`),g(`Authenticated as ${e.user.email} (${e.user.plan})`);}catch(e){throw s.fail(),e}}export{Q as default};//# sourceMappingURL=login-SO6BZ4HE.js.map
|
|
2
|
+
//# sourceMappingURL=login-SO6BZ4HE.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/lib/crypto/sanitize.ts","../src/lib/auth/ssp-handshake.ts","../src/commands/auth/login.ts"],"names":["zeroBuffer","buf","SERVER_PUB_KEY_HEX","clientEphemeralPriv","clientEphemeralPub","clientNonce","passwordProof","performSSPHandshake","email","password","pub","priv","generateKeypair","generateNonce","hashPassword","fingerprint","bytesToHex","blake3","os","timestamp","response","apiPost","serverNonce","hexToBytes","serverEphemeralPub","serverSignature","serverPubKey","signPayload","computeSignPayload","verifyServerSignature","cleanup","ecdhSecret","deriveSharedSecret","encryptionKey","deriveEncryptionKey","encryptedSession","sessionIv","sessionTag","session","decryptSession","saveSession","login","existing","loadSession","logInfo","force","inquirer","answers","v","spinner","createSpinner","renderMascot","logBrand","brand","logSuccess","err"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/lib/crypto/sanitize.ts","../src/lib/auth/ssp-handshake.ts","../src/commands/auth/login.ts"],"names":["zeroBuffer","buf","SERVER_PUB_KEY_HEX","clientEphemeralPriv","clientEphemeralPub","clientNonce","passwordProof","performSSPHandshake","email","password","pub","priv","generateKeypair","generateNonce","hashPassword","fingerprint","bytesToHex","blake3","os","timestamp","response","apiPost","serverNonce","hexToBytes","serverEphemeralPub","serverSignature","serverPubKey","signPayload","computeSignPayload","verifyServerSignature","cleanup","ecdhSecret","deriveSharedSecret","encryptionKey","deriveEncryptionKey","encryptedSession","sessionIv","sessionTag","session","decryptSession","saveSession","login","existing","loadSession","logInfo","force","inquirer","answers","v","spinner","createSpinner","renderMascot","logBrand","brand","logSuccess","err"],"mappings":"yXAUO,SAASA,CAAAA,CAAWC,EAAuB,CAChDA,CAAAA,CAAI,KAAK,CAAC,EACZ,CCLA,IAAMC,CAAAA,CAAqB,OAAA,CAAQ,GAAA,CAAI,2BAA6B,EAAA,CAEhEC,CAAAA,CAAyC,KACzCC,CAAAA,CAAwC,IAAA,CACxCC,EAAiC,IAAA,CACjCC,CAAAA,CAAmC,KAEvC,eAAsBC,CAAAA,CAAoBC,EAAeC,CAAAA,CAAyC,CAChG,GAAM,CAAE,GAAA,CAAAC,EAAK,IAAA,CAAAC,GAAK,CAAA,CAAIC,GAAAA,GACtBT,CAAAA,CAAsBQ,GAAAA,CACtBP,EAAqBM,CAAAA,CACrBL,CAAAA,CAAcQ,KAAc,CAC5BP,CAAAA,CAAgBQ,GAAAA,CAAaL,CAAAA,CAAUD,CAAK,CAAA,CAE5C,IAAMO,IAAcC,GAAAA,CAAWC,MAAAA,CAAOC,EAAG,QAAA,EAAS,CAAIA,CAAAA,CAAG,QAAA,GAAaA,CAAAA,CAAG,IAAA,EAAM,CAAC,CAAA,CAC1EC,EAAY,IAAA,CAAK,GAAA,GAEjBC,CAAAA,CAAW,MAAMC,EAAqB,qBAAA,CAAuB,CACjE,MAAAb,CAAAA,CACA,cAAA,CAAgBQ,IAAWV,CAAa,CAAA,CACxC,oBAAA,C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CAAA,iBAAA,EAAoBhB,CAAAA,CAAQ,KAAK,KAAK,CAAA,EAAA,EAAKA,EAAQ,IAAA,CAAK,IAAI,GAAG,EAC5E,CAAA,MAASiB,EAAK,CACZ,MAAAN,EAAQ,IAAA,EAAK,CACPM,CACR,CACF","file":"login-SO6BZ4HE.js","sourcesContent":["const ANSI_PATTERN = /[\\u001b\\u009b][[\\]()#;?]*(?:(?:(?:;[0-9a-fA-F]{1,4})*(?:;[0-9a-fA-F]{0,4})?)?[0-9A-PRZcf-nq-uy=><~])/g\n\nexport function sanitizeForTerminal(input: string): string {\n return input.replace(ANSI_PATTERN, '')\n}\n\nexport function sanitizeFilename(input: string): string {\n return input.replace(/[<>:\"/\\\\|?*\\x00-\\x1f]/g, '_').trim()\n}\n\nexport function zeroBuffer(buf: Uint8Array): void {\n buf.fill(0)\n}\n\nexport function zeroString(str: string): void {\n if (typeof str === 'string') {\n const len = str.length\n ;(str as unknown as Record<string, unknown>).valueOf = () => ''\n for (let i = 0; i < len; i++) {\n str = str[i] === str[i].charAt(0) ? '' : ''\n }\n }\n}\n","import os from 'node:os'\nimport { generateKeypair, generateNonce, hashPassword, bytesToHex, hexToBytes, computeSignPayload, deriveSharedSecret, deriveEncryptionKey, decryptSession, verifyServerSignature, SquidSession, SSPResponse } from '../crypto/ssp.js'\nimport { blake3 } from '@noble/hashes/blake3'\nimport { saveSession } from './session.js'\nimport { apiPost } from '../api/client.js'\nimport { zeroBuffer } from '../crypto/sanitize.js'\n\nconst SERVER_PUB_KEY_HEX = process.env.SQUIDCLOUD_SERVER_PUB_KEY || ''\n\nlet clientEphemeralPriv: Uint8Array | null = null\nlet clientEphemeralPub: Uint8Array | null = null\nlet clientNonce: Uint8Array | null = null\nlet passwordProof: Uint8Array | null = null\n\nexport async function performSSPHandshake(email: string, password: string): Promise<SquidSession> {\n const { pub, priv } = generateKeypair()\n clientEphemeralPriv = priv\n clientEphemeralPub = pub\n clientNonce = generateNonce()\n passwordProof = hashPassword(password, email)\n\n const fingerprint = bytesToHex(blake3(os.hostname() + os.platform() + os.arch()))\n const timestamp = Date.now()\n\n const response = await apiPost<SSPResponse>('/api/auth/ssp/hello', {\n email,\n password_proof: bytesToHex(passwordProof),\n client_ephemeral_pub: bytesToHex(clientEphemeralPub),\n client_nonce: bytesToHex(clientNonce),\n device_fingerprint: fingerprint,\n timestamp,\n })\n\n const serverNonce = hexToBytes(response.server_nonce)\n const serverEphemeralPub = hexToBytes(response.server_ephemeral_pub)\n const serverSignature = hexToBytes(response.server_signature)\n\n const serverPubKey = hexToBytes(SERVER_PUB_KEY_HEX)\n if (serverPubKey.length > 0) {\n const signPayload = computeSignPayload(clientNonce, serverNonce, clientEphemeralPub, timestamp)\n const isValid = await verifyServerSignature(serverSignature, signPayload, serverPubKey)\n if (!isValid) {\n cleanup()\n throw new Error('Connection rejected — server identity could not be verified')\n }\n }\n\n const ecdhSecret = deriveSharedSecret(serverEphemeralPub, clientEphemeralPriv)\n const encryptionKey = deriveEncryptionKey(ecdhSecret, clientNonce, serverNonce)\n const encryptedSession = hexToBytes(response.encrypted_session)\n const sessionIv = hexToBytes(response.session_iv)\n const sessionTag = hexToBytes(response.session_tag)\n\n const session = decryptSession(encryptedSession, sessionIv, sessionTag, encryptionKey)\n session.device_fingerprint = fingerprint\n\n await saveSession(session)\n cleanup()\n\n return session\n}\n\nfunction cleanup(): void {\n if (clientEphemeralPriv) zeroBuffer(clientEphemeralPriv)\n if (clientEphemeralPub) zeroBuffer(clientEphemeralPub)\n if (clientNonce) zeroBuffer(clientNonce)\n if (passwordProof) zeroBuffer(passwordProof)\n clientEphemeralPriv = null\n clientEphemeralPub = null\n clientNonce = null\n passwordProof = null\n}\n","import inquirer from 'inquirer'\nimport { performSSPHandshake } from '../../lib/auth/ssp-handshake.js'\nimport { loadSession } from '../../lib/auth/session.js'\nimport { createSpinner } from '../../lib/output/spinner.js'\nimport { logSuccess, logInfo, logBrand } from '../../lib/output/logger.js'\nimport { renderMascot } from '../../lib/output/mascot.js'\nimport { brand } from '../../lib/output/brand.js'\nimport { isInteractive } from '../../lib/utils/ci-detect.js'\n\nexport default async function login(): Promise<void> {\n const existing = await loadSession()\n if (existing) {\n logInfo(`Already authenticated as ${existing.user.email}`)\n const { force } = await inquirer.prompt([{\n type: 'confirm',\n name: 'force',\n message: 'Re-authenticate?',\n default: false,\n }])\n if (!force) return\n }\n\n const answers = await inquirer.prompt([\n {\n type: 'input',\n name: 'email',\n message: 'Email:',\n validate: (v: string) => v.includes('@') ? true : 'Please enter a valid email',\n },\n {\n type: 'password',\n name: 'password',\n message: 'Password:',\n mask: '*',\n },\n ])\n\n const spinner = createSpinner('Authenticating with SquidCloud...')\n spinner.start()\n\n try {\n const session = await performSSPHandshake(answers.email, answers.password)\n spinner.succeed()\n console.log(renderMascot())\n logBrand(`Welcome to SquidCloud, ${brand(session.user.username)}!`)\n logSuccess(`Authenticated as ${session.user.email} (${session.user.plan})`)\n } catch (err) {\n spinner.fail()\n throw err\n }\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {b}from'./chunk-FYFPDKJM.js';import {e}from'./chunk-BC2OVPRV.js';import'./chunk-NDB6KXYI.js';import'./chunk-THMWE2I6.js';import {g}from'./chunk-QT7R3AXE.js';import {o}from'./chunk-4NTVRCZM.js';async function i(){let o$1=b("Revoking session...");o$1.start();try{await e("/api/auth/ssp/revoke",{},{authenticated:!0});}catch{}await o(),o$1.succeed(),g("Logged out successfully");}export{i as default};//# sourceMappingURL=logout-QERO6G6B.js.map
|
|
2
|
+
//# sourceMappingURL=logout-QERO6G6B.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/commands/auth/logout.ts"],"names":["logout","spinner","createSpinner","apiPost","clearSession","logSuccess"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/commands/auth/logout.ts"],"names":["logout","spinner","createSpinner","apiPost","clearSession","logSuccess"],"mappings":"wMAKA,eAAOA,CAAAA,EAA+C,CACpD,IAAMC,GAAAA,CAAUC,EAAc,qBAAqB,CAAA,CACnDD,GAAAA,CAAQ,KAAA,EAAM,CACd,GAAI,CACF,MAAME,EAAQ,sBAAA,CAAwB,EAAC,CAAG,CAAE,aAAA,CAAe,CAAA,CAAK,CAAC,EACnE,MAAQ,CAER,CACA,MAAMC,CAAAA,GACNH,GAAAA,CAAQ,OAAA,EAAQ,CAChBI,CAAAA,CAAW,yBAAyB,EACtC","file":"logout-QERO6G6B.js","sourcesContent":["import { clearSession } from '../../lib/auth/session.js'\nimport { apiPost } from '../../lib/api/client.js'\nimport { createSpinner } from '../../lib/output/spinner.js'\nimport { logSuccess } from '../../lib/output/logger.js'\n\nexport default async function logout(): Promise<void> {\n const spinner = createSpinner('Revoking session...')\n spinner.start()\n try {\n await apiPost('/api/auth/ssp/revoke', {}, { authenticated: true })\n } catch {\n // Proceed with local cleanup regardless\n }\n await clearSession()\n spinner.succeed()\n logSuccess('Logged out successfully')\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {b}from'./chunk-FYFPDKJM.js';import {d}from'./chunk-BC2OVPRV.js';import'./chunk-NDB6KXYI.js';import'./chunk-THMWE2I6.js';import {g}from'./chunk-QT7R3AXE.js';import'./chunk-4NTVRCZM.js';import n from'fs';import p from'path';async function a(){let o=b("Exporting logs...");o.start();let i=await d("/api/v1/logs/export",{authenticated:true});o.succeed();let t=p.join(process.cwd(),`squidcloud-logs-${Date.now()}.jsonl`);n.writeFileSync(t,i.jsonl,"utf-8"),g(`Exported to ${t}`);}export{a as default};//# sourceMappingURL=logs-export-DYOPV2LT.js.map
|
|
2
|
+
//# sourceMappingURL=logs-export-DYOPV2LT.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/commands/logs/logs-export.ts"],"names":["logsExport","spinner","createSpinner","data","apiGet","filePath","path","fs","logSuccess"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/commands/logs/logs-export.ts"],"names":["logsExport","spinner","createSpinner","data","apiGet","filePath","path","fs","logSuccess"],"mappings":"sOAMA,eAAOA,CAAAA,EAAmD,CACxD,IAAMC,CAAAA,CAAUC,CAAAA,CAAc,mBAAmB,EACjDD,CAAAA,CAAQ,KAAA,EAAM,CACd,IAAME,CAAAA,CAAO,MAAMC,EAA0B,qBAAA,CAAuB,CAAE,aAAA,CAAe,IAAK,CAAC,CAAA,CAC3FH,EAAQ,OAAA,EAAQ,CAChB,IAAMI,CAAAA,CAAWC,CAAAA,CAAK,IAAA,CAAK,QAAQ,GAAA,EAAI,CAAG,CAAA,gBAAA,EAAmB,IAAA,CAAK,GAAA,EAAK,QAAQ,CAAA,CAC/EC,CAAAA,CAAG,aAAA,CAAcF,CAAAA,CAAUF,CAAAA,CAAK,KAAA,CAAO,OAAO,CAAA,CAC9CK,CAAAA,CAAW,CAAA,YAAA,EAAeH,CAAQ,CAAA,CAAE,EACtC","file":"logs-export-DYOPV2LT.js","sourcesContent":["import fs from 'node:fs'\nimport path from 'node:path'\nimport { apiGet } from '../../lib/api/client.js'\nimport { createSpinner } from '../../lib/output/spinner.js'\nimport { logSuccess } from '../../lib/output/logger.js'\n\nexport default async function logsExport(): Promise<void> {\n const spinner = createSpinner('Exporting logs...')\n spinner.start()\n const data = await apiGet<{ jsonl: string }>('/api/v1/logs/export', { authenticated: true })\n spinner.succeed()\n const filePath = path.join(process.cwd(), `squidcloud-logs-${Date.now()}.jsonl`)\n fs.writeFileSync(filePath, data.jsonl, 'utf-8')\n logSuccess(`Exported to ${filePath}`)\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {b}from'./chunk-FYFPDKJM.js';import {e}from'./chunk-BC2OVPRV.js';import'./chunk-NDB6KXYI.js';import'./chunk-THMWE2I6.js';import {g}from'./chunk-QT7R3AXE.js';import'./chunk-4NTVRCZM.js';async function n(e$1){let c=b(`Cancelling run ${e$1.slice(0,8)}...`);c.start(),await e(`/api/v1/scripts/runs/${e$1}/cancel`,{},{authenticated:true}),c.succeed(),g(`Run ${e$1.slice(0,8)} cancelled`);}export{n as default};//# sourceMappingURL=scripts-cancel-JS3LL2AT.js.map
|
|
2
|
+
//# sourceMappingURL=scripts-cancel-JS3LL2AT.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/commands/scripts/scripts-cancel.ts"],"names":["scriptsCancel","runId","spinner","createSpinner","apiPost","logSuccess"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/commands/scripts/scripts-cancel.ts"],"names":["scriptsCancel","runId","spinner","createSpinner","apiPost","logSuccess"],"mappings":"gMAIA,eAAOA,EAAqCC,GAAAA,CAA8B,CACxE,IAAMC,CAAAA,CAAUC,CAAAA,CAAc,kBAAkBF,GAAAA,CAAM,KAAA,CAAM,CAAA,CAAG,CAAC,CAAC,CAAA,GAAA,CAAK,CAAA,CACtEC,EAAQ,KAAA,EAAM,CACd,MAAME,CAAAA,CAAQ,CAAA,qBAAA,EAAwBH,GAAK,CAAA,OAAA,CAAA,CAAW,EAAC,CAAG,CAAE,cAAe,IAAK,CAAC,EACjFC,CAAAA,CAAQ,OAAA,EAAQ,CAChBG,CAAAA,CAAW,OAAOJ,GAAAA,CAAM,KAAA,CAAM,EAAG,CAAC,CAAC,YAAY,EACjD","file":"scripts-cancel-JS3LL2AT.js","sourcesContent":["import { apiPost } from '../../lib/api/client.js'\nimport { createSpinner } from '../../lib/output/spinner.js'\nimport { logSuccess } from '../../lib/output/logger.js'\n\nexport default async function scriptsCancel(runId: string): Promise<void> {\n const spinner = createSpinner(`Cancelling run ${runId.slice(0, 8)}...`)\n spinner.start()\n await apiPost(`/api/v1/scripts/runs/${runId}/cancel`, {}, { authenticated: true })\n spinner.succeed()\n logSuccess(`Run ${runId.slice(0, 8)} cancelled`)\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {b}from'./chunk-FYFPDKJM.js';import {g}from'./chunk-BC2OVPRV.js';import'./chunk-NDB6KXYI.js';import'./chunk-THMWE2I6.js';import {g as g$1}from'./chunk-QT7R3AXE.js';import'./chunk-4NTVRCZM.js';import s from'inquirer';async function c(e){let{confirm:p}=await s.prompt([{type:"input",name:"confirm",message:`Type "${e}" to permanently delete this pipeline:`,validate:n=>n===e?true:"Type the exact name to confirm"}]);if(p!==e)return;let t=b(`Deleting "${e}"...`);t.start(),await g(`/api/v1/scripts/${e}`,{authenticated:true}),t.succeed(),g$1(`Pipeline "${e}" deleted`);}export{c as default};//# sourceMappingURL=scripts-delete-274TW63X.js.map
|
|
2
|
+
//# sourceMappingURL=scripts-delete-274TW63X.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/commands/scripts/scripts-delete.ts"],"names":["scriptsDelete","name","confirm","inquirer","v","spinner","createSpinner","apiDelete","logSuccess"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/commands/scripts/scripts-delete.ts"],"names":["scriptsDelete","name","confirm","inquirer","v","spinner","createSpinner","apiDelete","logSuccess"],"mappings":"+NAKA,eAAOA,CAAAA,CAAqCC,CAAAA,CAA6B,CACvE,GAAM,CAAE,OAAA,CAAAC,CAAQ,CAAA,CAAI,MAAMC,EAAS,MAAA,CAAO,CAAC,CACzC,IAAA,CAAM,OAAA,CACN,IAAA,CAAM,SAAA,CACN,OAAA,CAAS,CAAA,MAAA,EAASF,CAAI,CAAA,sCAAA,CAAA,CACtB,QAAA,CAAWG,CAAAA,EAAcA,CAAAA,GAAMH,CAAAA,CAAO,IAAA,CAAO,gCAC/C,CAAC,CAAC,CAAA,CACF,GAAIC,CAAAA,GAAYD,CAAAA,CAAM,OAEtB,IAAMI,CAAAA,CAAUC,CAAAA,CAAc,CAAA,UAAA,EAAaL,CAAI,CAAA,IAAA,CAAM,CAAA,CACrDI,CAAAA,CAAQ,KAAA,GACR,MAAME,CAAAA,CAAU,CAAA,gBAAA,EAAmBN,CAAI,CAAA,CAAA,CAAI,CAAE,aAAA,CAAe,IAAK,CAAC,CAAA,CAClEI,CAAAA,CAAQ,OAAA,EAAQ,CAChBG,GAAAA,CAAW,CAAA,UAAA,EAAaP,CAAI,WAAW,EACzC","file":"scripts-delete-274TW63X.js","sourcesContent":["import inquirer from 'inquirer'\nimport { apiDelete } from '../../lib/api/client.js'\nimport { createSpinner } from '../../lib/output/spinner.js'\nimport { logSuccess } from '../../lib/output/logger.js'\n\nexport default async function scriptsDelete(name: string): Promise<void> {\n const { confirm } = await inquirer.prompt([{\n type: 'input',\n name: 'confirm',\n message: `Type \"${name}\" to permanently delete this pipeline:`,\n validate: (v: string) => v === name ? true : 'Type the exact name to confirm',\n }])\n if (confirm !== name) return\n\n const spinner = createSpinner(`Deleting \"${name}\"...`)\n spinner.start()\n await apiDelete(`/api/v1/scripts/${name}`, { authenticated: true })\n spinner.succeed()\n logSuccess(`Pipeline \"${name}\" deleted`)\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {b}from'./chunk-FYFPDKJM.js';import {e}from'./chunk-BC2OVPRV.js';import'./chunk-NDB6KXYI.js';import'./chunk-THMWE2I6.js';import {g}from'./chunk-QT7R3AXE.js';import'./chunk-4NTVRCZM.js';async function o(i){let t=b(`Disabling "${i}"...`);t.start(),await e(`/api/v1/scripts/${i}/disable`,{},{authenticated:true}),t.succeed(),g(`Pipeline "${i}" disabled`);}export{o as default};//# sourceMappingURL=scripts-disable-JPATOVO4.js.map
|
|
2
|
+
//# sourceMappingURL=scripts-disable-JPATOVO4.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/commands/scripts/scripts-disable.ts"],"names":["scriptsDisable","name","spinner","createSpinner","apiPost","logSuccess"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/commands/scripts/scripts-disable.ts"],"names":["scriptsDisable","name","spinner","createSpinner","apiPost","logSuccess"],"mappings":"gMAIA,eAAOA,CAAAA,CAAsCC,CAAAA,CAA6B,CACxE,IAAMC,EAAUC,CAAAA,CAAc,CAAA,WAAA,EAAcF,CAAI,CAAA,IAAA,CAAM,CAAA,CACtDC,CAAAA,CAAQ,KAAA,EAAM,CACd,MAAME,CAAAA,CAAQ,CAAA,gBAAA,EAAmBH,CAAI,CAAA,QAAA,CAAA,CAAY,EAAC,CAAG,CAAE,aAAA,CAAe,IAAK,CAAC,CAAA,CAC5EC,CAAAA,CAAQ,OAAA,EAAQ,CAChBG,CAAAA,CAAW,CAAA,UAAA,EAAaJ,CAAI,YAAY,EAC1C","file":"scripts-disable-JPATOVO4.js","sourcesContent":["import { apiPost } from '../../lib/api/client.js'\nimport { createSpinner } from '../../lib/output/spinner.js'\nimport { logSuccess } from '../../lib/output/logger.js'\n\nexport default async function scriptsDisable(name: string): Promise<void> {\n const spinner = createSpinner(`Disabling \"${name}\"...`)\n spinner.start()\n await apiPost(`/api/v1/scripts/${name}/disable`, {}, { authenticated: true })\n spinner.succeed()\n logSuccess(`Pipeline \"${name}\" disabled`)\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {b}from'./chunk-FYFPDKJM.js';import {e}from'./chunk-BC2OVPRV.js';import'./chunk-NDB6KXYI.js';import'./chunk-THMWE2I6.js';import {g}from'./chunk-QT7R3AXE.js';import'./chunk-4NTVRCZM.js';async function s(t){let e$1=b(`Enabling "${t}"...`);e$1.start(),await e(`/api/v1/scripts/${t}/enable`,{},{authenticated:true}),e$1.succeed(),g(`Pipeline "${t}" enabled`);}export{s as default};//# sourceMappingURL=scripts-enable-JVAA6AMP.js.map
|
|
2
|
+
//# sourceMappingURL=scripts-enable-JVAA6AMP.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/commands/scripts/scripts-enable.ts"],"names":["scriptsEnable","name","spinner","createSpinner","apiPost","logSuccess"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/commands/scripts/scripts-enable.ts"],"names":["scriptsEnable","name","spinner","createSpinner","apiPost","logSuccess"],"mappings":"gMAIA,eAAOA,CAAAA,CAAqCC,CAAAA,CAA6B,CACvE,IAAMC,IAAUC,CAAAA,CAAc,CAAA,UAAA,EAAaF,CAAI,CAAA,IAAA,CAAM,CAAA,CACrDC,GAAAA,CAAQ,KAAA,EAAM,CACd,MAAME,CAAAA,CAAQ,CAAA,gBAAA,EAAmBH,CAAI,CAAA,OAAA,CAAA,CAAW,EAAC,CAAG,CAAE,aAAA,CAAe,IAAK,CAAC,CAAA,CAC3EC,GAAAA,CAAQ,OAAA,EAAQ,CAChBG,CAAAA,CAAW,CAAA,UAAA,EAAaJ,CAAI,WAAW,EACzC","file":"scripts-enable-JVAA6AMP.js","sourcesContent":["import { apiPost } from '../../lib/api/client.js'\nimport { createSpinner } from '../../lib/output/spinner.js'\nimport { logSuccess } from '../../lib/output/logger.js'\n\nexport default async function scriptsEnable(name: string): Promise<void> {\n const spinner = createSpinner(`Enabling \"${name}\"...`)\n spinner.start()\n await apiPost(`/api/v1/scripts/${name}/enable`, {}, { authenticated: true })\n spinner.succeed()\n logSuccess(`Pipeline \"${name}\" enabled`)\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {b}from'./chunk-FYFPDKJM.js';import {d}from'./chunk-BC2OVPRV.js';import {a}from'./chunk-NDB6KXYI.js';import {a as a$1}from'./chunk-THMWE2I6.js';import {c}from'./chunk-G4JU7IUC.js';import'./chunk-QT7R3AXE.js';import {m}from'./chunk-4NTVRCZM.js';import {WebSocket}from'ws';import s from'chalk';async function y(e,n,g){if(g?.live){let t=await m();t||(console.error("Not authenticated"),process.exit(1));let o=a().replace(/^http/,"ws"),r=new WebSocket(`${o}/api/v1/scripts/${e}/logs/live`,{headers:{Authorization:`Bearer ${t.access_token}`}});console.log(s.dim(`Streaming live logs for "${e}"... (Ctrl+C to stop)`)),r.on("message",i=>console.log(i.toString())),r.on("error",i=>{console.error(s.red(`Error: ${i.message}`)),process.exit(1);}),process.on("SIGINT",()=>{r.close(),process.exit(0);});return}if(n){let t=await d(`/api/v1/scripts/${e}/logs/${n}`,{authenticated:true});for(let o of t.logs||[])console.log(o);return}let l=b("Fetching run history...");l.start();let f=await d(`/api/v1/scripts/${e}/runs`,{authenticated:true});l.stop();let h=(f.runs||[]).map(t=>({id:s.dim(t.run_id.slice(0,8)),status:t.status==="success"?s.green("\u2713"):t.status==="failed"?s.red("\u2717"):s.yellow("\u25CB"),started:t.started_at?c(t.started_at):"-",duration:t.duration_ms?`${(t.duration_ms/1e3).toFixed(1)}s`:"-"}));console.log(a$1(h,[{key:"id",label:"Run"},{key:"status",label:""},{key:"started",label:"Started"},{key:"duration",label:"Duration"}]));}export{y as default};//# sourceMappingURL=scripts-logs-VISO5ONQ.js.map
|
|
2
|
+
//# sourceMappingURL=scripts-logs-VISO5ONQ.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/commands/scripts/scripts-logs.ts"],"names":["scriptsLogs","name","runId","options","session","loadSession","apiBase","getApiBase","ws","WebSocket","chalk","data","err","apiGet","line","spinner","createSpinner","rows","r","formatRelative","renderTable"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/commands/scripts/scripts-logs.ts"],"names":["scriptsLogs","name","runId","options","session","loadSession","apiBase","getApiBase","ws","WebSocket","chalk","data","err","apiGet","line","spinner","createSpinner","rows","r","formatRelative","renderTable"],"mappings":"2SAgBA,eAAOA,CAAAA,CAAmCC,CAAAA,CAAcC,CAAAA,CAAgBC,CAAAA,CAA6C,CACnH,GAAIA,CAAAA,EAAS,IAAA,CAAM,CACjB,IAAMC,CAAAA,CAAU,MAAMC,CAAAA,EAAY,CAC7BD,CAAAA,GAAW,OAAA,CAAQ,KAAA,CAAM,mBAAmB,CAAA,CAAG,OAAA,CAAQ,IAAA,CAAK,CAAC,CAAA,CAAA,CAClE,IAAME,CAAAA,CAAUC,CAAAA,EAAW,CAAE,OAAA,CAAQ,OAAA,CAAS,IAAI,CAAA,CAC5CC,CAAAA,CAAK,IAAIC,SAAAA,CAAU,CAAA,EAAGH,CAAO,CAAA,gBAAA,EAA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A,CAAA,CAAS,CAAE,aAAA,CAAe,IAAK,CAAC,CAAA,CACvGc,CAAAA,CAAQ,IAAA,EAAK,CACb,IAAME,CAAAA,CAAAA,CAAQN,CAAAA,CAAK,IAAA,EAAQ,EAAC,EAAG,GAAA,CAAIO,CAAAA,GAAM,CACvC,EAAA,CAAIR,CAAAA,CAAM,GAAA,CAAIQ,CAAAA,CAAE,MAAA,CAAO,KAAA,CAAM,CAAA,CAAG,CAAC,CAAC,CAAA,CAClC,MAAA,CAAQA,CAAAA,CAAE,MAAA,GAAW,SAAA,CAAYR,CAAAA,CAAM,MAAM,QAAG,CAAA,CAAIQ,CAAAA,CAAE,MAAA,GAAW,QAAA,CAAWR,CAAAA,CAAM,GAAA,CAAI,QAAG,CAAA,CAAIA,CAAAA,CAAM,MAAA,CAAO,QAAG,CAAA,CAC7G,OAAA,CAASQ,CAAAA,CAAE,UAAA,CAAaC,CAAAA,CAAeD,CAAAA,CAAE,UAAU,CAAA,CAAI,GAAA,CACvD,QAAA,CAAUA,CAAAA,CAAE,WAAA,CAAc,CAAA,EAAA,CAAIA,CAAAA,CAAE,WAAA,CAAc,GAAA,EAAM,OAAA,CAAQ,CAAC,CAAC,CAAA,CAAA,CAAA,CAAM,GACtE,CAAA,CAAE,CAAA,CACF,OAAA,CAAQ,GAAA,CAAIE,GAAAA,CAAYH,CAAAA,CAAM,CAC5B,CAAE,GAAA,CAAK,IAAA,CAAM,KAAA,CAAO,KAAM,CAAA,CAC1B,CAAE,GAAA,CAAK,QAAA,CAAU,KAAA,CAAO,EAAG,CAAA,CAC3B,CAAE,GAAA,CAAK,SAAA,CAAW,KAAA,CAAO,SAAU,CAAA,CACnC,CAAE,GAAA,CAAK,UAAA,CAAY,KAAA,CAAO,UAAW,CACvC,CAAC,CAAC,EACJ","file":"scripts-logs-VISO5ONQ.js","sourcesContent":["import { apiGet } from '../../lib/api/client.js'\nimport { WebSocket } from 'ws'\nimport { renderTable } from '../../lib/output/table.js'\nimport { createSpinner } from '../../lib/output/spinner.js'\nimport { formatRelative } from '../../lib/utils/format.js'\nimport { loadSession } from '../../lib/auth/session.js'\nimport { getApiBase } from '../../lib/api/cert-pin.js'\nimport chalk from 'chalk'\n\ninterface RunEntry {\n run_id: string\n status: string\n started_at: string\n duration_ms: number\n}\n\nexport default async function scriptsLogs(name: string, runId?: string, options?: { live?: boolean }): Promise<void> {\n if (options?.live) {\n const session = await loadSession()\n if (!session) { console.error('Not authenticated'); process.exit(1) }\n const apiBase = getApiBase().replace(/^http/, 'ws')\n const ws = new WebSocket(`${apiBase}/api/v1/scripts/${name}/logs/live`, {\n headers: { Authorization: `Bearer ${session.access_token}` },\n })\n console.log(chalk.dim(`Streaming live logs for \"${name}\"... (Ctrl+C to stop)`))\n ws.on('message', (data: Buffer) => console.log(data.toString()))\n ws.on('error', (err) => { console.error(chalk.red(`Error: ${err.message}`)); process.exit(1) })\n process.on('SIGINT', () => { ws.close(); process.exit(0) })\n return\n }\n\n if (runId) {\n const data = await apiGet<{ logs: string[] }>(`/api/v1/scripts/${name}/logs/${runId}`, { authenticated: true })\n for (const line of data.logs || []) {\n console.log(line)\n }\n return\n }\n\n const spinner = createSpinner('Fetching run history...')\n spinner.start()\n const data = await apiGet<{ runs: RunEntry[] }>(`/api/v1/scripts/${name}/runs`, { authenticated: true })\n spinner.stop()\n const rows = (data.runs || []).map(r => ({\n id: chalk.dim(r.run_id.slice(0, 8)),\n status: r.status === 'success' ? chalk.green('✓') : r.status === 'failed' ? chalk.red('✗') : chalk.yellow('○'),\n started: r.started_at ? formatRelative(r.started_at) : '-',\n duration: r.duration_ms ? `${(r.duration_ms / 1000).toFixed(1)}s` : '-',\n }))\n console.log(renderTable(rows, [\n { key: 'id', label: 'Run' },\n { key: 'status', label: '' },\n { key: 'started', label: 'Started' },\n { key: 'duration', label: 'Duration' },\n ]))\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {b}from'./chunk-FYFPDKJM.js';import {e}from'./chunk-BC2OVPRV.js';import'./chunk-NDB6KXYI.js';import'./chunk-THMWE2I6.js';import {j,f,m,g}from'./chunk-QT7R3AXE.js';import'./chunk-4NTVRCZM.js';async function l(r,n){let t={};if(n?.env)for(let d of n.env){let[o,...a]=d.split("=");o&&(t[o]=a.join("="));}if(n?.dryRun){j(`[DRY-RUN] Would run script "${r}" with env: ${JSON.stringify(t)}`);return}let i=b(`Running script "${r}"...`);i.start();let s=await e("/api/v1/scripts/run",{name:r,env:t},{authenticated:true});if(i.succeed(),f()){m(s);return}g(`Script "${r}" triggered (run: ${s.run_id.slice(0,8)})`);}export{l as default};//# sourceMappingURL=scripts-run-3NBYKEMQ.js.map
|
|
2
|
+
//# sourceMappingURL=scripts-run-3NBYKEMQ.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/commands/scripts/scripts-run.ts"],"names":["scriptsRun","name","options","envVars","e","k","v","logInfo","spinner","createSpinner","result","apiPost","isJsonMode","logJSON","logSuccess"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/commands/scripts/scripts-run.ts"],"names":["scriptsRun","name","options","envVars","e","k","v","logInfo","spinner","createSpinner","result","apiPost","isJsonMode","logJSON","logSuccess"],"mappings":"sMAUA,eAAOA,CAAAA,CAAkCC,EAAcC,CAAAA,CAAqC,CAC1F,IAAMC,CAAAA,CAAkC,EAAC,CACzC,GAAID,CAAAA,EAAS,GAAA,CACX,QAAWE,CAAAA,IAAKF,CAAAA,CAAQ,IAAK,CAC3B,GAAM,CAACG,CAAAA,CAAG,GAAGC,CAAC,CAAA,CAAIF,CAAAA,CAAE,KAAA,CAAM,GAAG,CAAA,CACzBC,CAAAA,GAAGF,EAAQE,CAAC,CAAA,CAAIC,EAAE,IAAA,CAAK,GAAG,CAAA,EAChC,CAGF,GAAIJ,CAAAA,EAAS,OAAQ,CACnBK,CAAAA,CAAQ,+BAA+BN,CAAI,CAAA,YAAA,EAAe,KAAK,SAAA,CAAUE,CAAO,CAAC,CAAA,CAAE,CAAA,CACnF,MACF,CAEA,IAAMK,CAAAA,CAAUC,EAAc,CAAA,gBAAA,EAAmBR,CAAI,MAAM,CAAA,CAC3DO,CAAAA,CAAQ,KAAA,EAAM,CACd,IAAME,CAAAA,CAAS,MAAMC,CAAAA,CAA4C,qBAAA,CAAuB,CAAE,IAAA,CAAAV,CAAAA,CAAM,IAAKE,CAAQ,CAAA,CAAG,CAAE,aAAA,CAAe,IAAK,CAAC,EAGvI,GAFAK,CAAAA,CAAQ,SAAQ,CAEZI,CAAAA,GAAc,CAChBC,CAAAA,CAAQH,CAAM,CAAA,CACd,MACF,CACAI,EAAW,CAAA,QAAA,EAAWb,CAAI,qBAAqBS,CAAAA,CAAO,MAAA,CAAO,MAAM,CAAA,CAAG,CAAC,CAAC,CAAA,CAAA,CAAG,EAC7E","file":"scripts-run-3NBYKEMQ.js","sourcesContent":["import { apiPost } from '../../lib/api/client.js'\nimport { createSpinner } from '../../lib/output/spinner.js'\nimport { logSuccess, logJSON, logInfo } from '../../lib/output/logger.js'\nimport { isJsonMode } from '../../lib/output/logger.js'\n\ninterface RunOptions {\n env?: string[]\n dryRun?: boolean\n}\n\nexport default async function scriptsRun(name: string, options?: RunOptions): Promise<void> {\n const envVars: Record<string, string> = {}\n if (options?.env) {\n for (const e of options.env) {\n const [k, ...v] = e.split('=')\n if (k) envVars[k] = v.join('=')\n }\n }\n\n if (options?.dryRun) {\n logInfo(`[DRY-RUN] Would run script \"${name}\" with env: ${JSON.stringify(envVars)}`)\n return\n }\n\n const spinner = createSpinner(`Running script \"${name}\"...`)\n spinner.start()\n const result = await apiPost<{ run_id: string; status: string }>('/api/v1/scripts/run', { name, env: envVars }, { authenticated: true })\n spinner.succeed()\n\n if (isJsonMode()) {\n logJSON(result)\n return\n }\n logSuccess(`Script \"${name}\" triggered (run: ${result.run_id.slice(0, 8)})`)\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {b}from'./chunk-FYFPDKJM.js';import {d}from'./chunk-BC2OVPRV.js';import'./chunk-NDB6KXYI.js';import'./chunk-THMWE2I6.js';import {c}from'./chunk-G4JU7IUC.js';import {f,m,l}from'./chunk-QT7R3AXE.js';import'./chunk-4NTVRCZM.js';import t from'chalk';async function h(r){let n=b(`Checking status of "${r}"...`);n.start();let u=await d(`/api/v1/scripts/${r}/status`,{authenticated:true});n.stop();let e=u.status;if(f()){m(e);return}l(""),l(` ${t.bold(e.name)}`),l(t.dim(" \u2500\u2500\u2500".repeat(8)));let c$1=e.health==="healthy"?t.green:e.health==="degraded"?t.yellow:t.red;l(` ${t.bold("Health:")} ${c$1("\u25CF")} ${e.health}`),l(` ${t.bold("Enabled:")} ${e.enabled?t.green("yes"):t.red("no")}`),l(` ${t.bold("Running:")} ${e.running?t.yellow("yes"):t.green("no")}`),l(` ${t.bold("Last OK:")} ${e.last_success?c(e.last_success):t.dim("never")}`),l(` ${t.bold("Last Fail:")} ${e.last_failure?c(e.last_failure):t.dim("never")}`),l("");}export{h as default};//# sourceMappingURL=scripts-status-45K3IL5L.js.map
|
|
2
|
+
//# sourceMappingURL=scripts-status-45K3IL5L.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/commands/scripts/scripts-status.ts"],"names":["scriptsStatus","name","spinner","createSpinner","data","apiGet","s","isJsonMode","logJSON","logRaw","chalk","healthColor","formatRelative"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/commands/scripts/scripts-status.ts"],"names":["scriptsStatus","name","spinner","createSpinner","data","apiGet","s","isJsonMode","logJSON","logRaw","chalk","healthColor","formatRelative"],"mappings":"6PAgBA,eAAOA,EAAqCC,CAAAA,CAA6B,CACvE,IAAMC,CAAAA,CAAUC,CAAAA,CAAc,CAAA,oBAAA,EAAuBF,CAAI,MAAM,CAAA,CAC/DC,CAAAA,CAAQ,OAAM,CACd,IAAME,EAAO,MAAMC,CAAAA,CAAiC,CAAA,gBAAA,EAAmBJ,CAAI,UAAW,CAAE,aAAA,CAAe,IAAK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IAAI,OAAO,CAAC,EAAE,CAAA,CAC7GD,CAAAA,CAAO,CAAA,EAAA,EAAKC,CAAAA,CAAM,KAAK,YAAY,CAAC,IAAIJ,CAAAA,CAAE,YAAA,CAAeM,EAAeN,CAAAA,CAAE,YAAY,CAAA,CAAII,CAAAA,CAAM,IAAI,OAAO,CAAC,EAAE,CAAA,CAC9GD,CAAAA,CAAO,EAAE,EACX","file":"scripts-status-45K3IL5L.js","sourcesContent":["import { apiGet } from '../../lib/api/client.js'\nimport { createSpinner } from '../../lib/output/spinner.js'\nimport { logJSON, logRaw } from '../../lib/output/logger.js'\nimport { isJsonMode } from '../../lib/output/logger.js'\nimport { formatRelative } from '../../lib/utils/format.js'\nimport chalk from 'chalk'\n\ninterface ScriptStatus {\n name: string\n enabled: boolean\n running: boolean\n last_success: string | null\n last_failure: string | null\n health: 'healthy' | 'degraded' | 'failing'\n}\n\nexport default async function scriptsStatus(name: string): Promise<void> {\n const spinner = createSpinner(`Checking status of \"${name}\"...`)\n spinner.start()\n const data = await apiGet<{ status: ScriptStatus }>(`/api/v1/scripts/${name}/status`, { authenticated: true })\n spinner.stop()\n const s = data.status\n\n if (isJsonMode()) {\n logJSON(s)\n return\n }\n\n logRaw('')\n logRaw(` ${chalk.bold(s.name)}`)\n logRaw(chalk.dim(' ───'.repeat(8)))\n const healthColor = s.health === 'healthy' ? chalk.green : s.health === 'degraded' ? chalk.yellow : chalk.red\n logRaw(` ${chalk.bold('Health:')} ${healthColor('●')} ${s.health}`)\n logRaw(` ${chalk.bold('Enabled:')} ${s.enabled ? chalk.green('yes') : chalk.red('no')}`)\n logRaw(` ${chalk.bold('Running:')} ${s.running ? chalk.yellow('yes') : chalk.green('no')}`)\n logRaw(` ${chalk.bold('Last OK:')} ${s.last_success ? formatRelative(s.last_success) : chalk.dim('never')}`)\n logRaw(` ${chalk.bold('Last Fail:')} ${s.last_failure ? formatRelative(s.last_failure) : chalk.dim('never')}`)\n logRaw('')\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {b}from'./chunk-FYFPDKJM.js';import {e as e$1}from'./chunk-BC2OVPRV.js';import'./chunk-NDB6KXYI.js';import'./chunk-THMWE2I6.js';import {h,f,m,g as g$1}from'./chunk-QT7R3AXE.js';import'./chunk-4NTVRCZM.js';import d from'fs';import e from'path';async function g(n){let r=n?e.resolve(n):e.join(process.cwd(),".squid.yml");d.existsSync(r)||(h(`File not found: ${r}`),process.exit(1));let m$1=d.readFileSync(r,"utf-8"),i=b("Validating...");i.start();try{let o=await e$1("/api/v1/scripts/validate",{filename:e.basename(r),content:m$1});if(i.succeed(),f()){m(o);return}if(o.valid&&g$1("Valid SquidScript!"),o.warnings?.length)for(let t of o.warnings)console.log(` \u26A0 ${t}`);if(o.errors?.length)for(let t of o.errors)console.log(` \u2717 ${t}`);}catch{i.fail(),h("Validation failed"),process.exit(1);}}export{g as default};//# sourceMappingURL=scripts-validate-JZPIIMIX.js.map
|
|
2
|
+
//# sourceMappingURL=scripts-validate-JZPIIMIX.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/commands/scripts/scripts-validate.ts"],"names":["scriptsValidate","filePath","targetPath","path","fs","logError","content","spinner","createSpinner","result","apiPost","isJsonMode","logJSON","logSuccess","w","e"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/commands/scripts/scripts-validate.ts"],"names":["scriptsValidate","filePath","targetPath","path","fs","logError","content","spinner","createSpinner","result","apiPost","isJsonMode","logJSON","logSuccess","w","e"],"mappings":"0PAOA,eAAOA,CAAAA,CAAuCC,CAAAA,CAAkC,CAC9E,IAAMC,CAAAA,CAAaD,CAAAA,CAAWE,CAAAA,CAAK,OAAA,CAAQF,CAAQ,CAAA,CAAIE,CAAAA,CAAK,IAAA,CAAK,OAAA,CAAQ,GAAA,EAAI,CAAG,YAAY,CAAA,CAEvFC,CAAAA,CAAG,UAAA,CAAWF,CAAU,CAAA,GAC3BG,CAAAA,CAAS,CAAA,gBAAA,EAAmBH,CAAU,CAAA,CAAE,CAAA,CACxC,OAAA,CAAQ,IAAA,CAAK,CAAC,CAAA,CAAA,CAGhB,IAAMI,GAAAA,CAAUF,CAAAA,CAAG,YAAA,CAAaF,CAAAA,CAAY,OAAO,CAAA,CAE7CK,CAAAA,CAAUC,CAAAA,CAAc,eAAe,CAAA,CAC7CD,CAAAA,CAAQ,KAAA,EAAM,CACd,GAAI,CACF,IAAME,CAAAA,CAAS,MAAMC,GAAAA,CAAoE,0BAAA,CAA4B,CACnH,QAAA,CAAUP,CAAAA,CAAK,QAAA,CAASD,CAAU,CAAA,CAClC,OAAA,CAAAI,GACF,CAAC,CAAA,CAED,GADAC,CAAAA,CAAQ,OAAA,EAAQ,CACZI,CAAAA,EAAW,CAAG,CAChBC,CAAAA,CAAQH,CAAM,CAAA,CACd,MACF,CAIA,GAHIA,CAAAA,CAAO,KAAA,EACTI,GAAAA,CAAW,oBAAoB,CAAA,CAE7BJ,CAAAA,CAAO,QAAA,EAAU,MAAA,CACnB,IAAA,IAAWK,CAAAA,IAAKL,CAAAA,CAAO,QAAA,CACrB,OAAA,CAAQ,GAAA,CAAI,CAAA,SAAA,EAAOK,CAAC,CAAA,CAAE,CAAA,CAG1B,GAAIL,CAAAA,CAAO,MAAA,EAAQ,MAAA,CACjB,IAAA,IAAWM,CAAAA,IAAKN,CAAAA,CAAO,MAAA,CACrB,OAAA,CAAQ,GAAA,CAAI,CAAA,SAAA,EAAOM,CAAC,CAAA,CAAE,EAG5B,CAAA,KAAQ,CACNR,CAAAA,CAAQ,IAAA,EAAK,CACbF,CAAAA,CAAS,mBAAmB,CAAA,CAC5B,OAAA,CAAQ,IAAA,CAAK,CAAC,EAChB,CACF","file":"scripts-validate-JZPIIMIX.js","sourcesContent":["import fs from 'node:fs'\nimport path from 'node:path'\nimport { apiPost } from '../../lib/api/client.js'\nimport { createSpinner } from '../../lib/output/spinner.js'\nimport { logSuccess, logError, logJSON } from '../../lib/output/logger.js'\nimport { isJsonMode } from '../../lib/output/logger.js'\n\nexport default async function scriptsValidate(filePath?: string): Promise<void> {\n const targetPath = filePath ? path.resolve(filePath) : path.join(process.cwd(), '.squid.yml')\n\n if (!fs.existsSync(targetPath)) {\n logError(`File not found: ${targetPath}`)\n process.exit(1)\n }\n\n const content = fs.readFileSync(targetPath, 'utf-8')\n\n const spinner = createSpinner('Validating...')\n spinner.start()\n try {\n const result = await apiPost<{ valid: boolean; errors?: string[]; warnings?: string[] }>('/api/v1/scripts/validate', {\n filename: path.basename(targetPath),\n content,\n })\n spinner.succeed()\n if (isJsonMode()) {\n logJSON(result)\n return\n }\n if (result.valid) {\n logSuccess('Valid SquidScript!')\n }\n if (result.warnings?.length) {\n for (const w of result.warnings) {\n console.log(` ⚠ ${w}`)\n }\n }\n if (result.errors?.length) {\n for (const e of result.errors) {\n console.log(` ✗ ${e}`)\n }\n }\n } catch {\n spinner.fail()\n logError('Validation failed')\n process.exit(1)\n }\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {b}from'./chunk-FYFPDKJM.js';import {e}from'./chunk-BC2OVPRV.js';import'./chunk-NDB6KXYI.js';import'./chunk-THMWE2I6.js';import {g}from'./chunk-QT7R3AXE.js';import'./chunk-4NTVRCZM.js';async function a(e$1){let i=b(`Cancelling request ${e$1.slice(0,8)}...`);i.start(),await e(`/api/v1/sign/${e$1}/cancel`,{},{authenticated:true}),i.succeed(),g(`Signing request ${e$1.slice(0,8)} cancelled`);}export{a as default};//# sourceMappingURL=sign-cancel-OUJM5UZT.js.map
|
|
2
|
+
//# sourceMappingURL=sign-cancel-OUJM5UZT.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/commands/sign/sign-cancel.ts"],"names":["signCancel","requestId","spinner","createSpinner","apiPost","logSuccess"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/commands/sign/sign-cancel.ts"],"names":["signCancel","requestId","spinner","createSpinner","apiPost","logSuccess"],"mappings":"gMAIA,eAAOA,EAAkCC,GAAAA,CAAkC,CACzE,IAAMC,CAAAA,CAAUC,CAAAA,CAAc,sBAAsBF,GAAAA,CAAU,KAAA,CAAM,CAAA,CAAG,CAAC,CAAC,CAAA,GAAA,CAAK,CAAA,CAC9EC,EAAQ,KAAA,EAAM,CACd,MAAME,CAAAA,CAAQ,CAAA,aAAA,EAAgBH,GAAS,CAAA,OAAA,CAAA,CAAW,EAAC,CAAG,CAAE,cAAe,IAAK,CAAC,EAC7EC,CAAAA,CAAQ,OAAA,EAAQ,CAChBG,CAAAA,CAAW,mBAAmBJ,GAAAA,CAAU,KAAA,CAAM,EAAG,CAAC,CAAC,YAAY,EACjE","file":"sign-cancel-OUJM5UZT.js","sourcesContent":["import { apiPost } from '../../lib/api/client.js'\nimport { createSpinner } from '../../lib/output/spinner.js'\nimport { logSuccess } from '../../lib/output/logger.js'\n\nexport default async function signCancel(requestId: string): Promise<void> {\n const spinner = createSpinner(`Cancelling request ${requestId.slice(0, 8)}...`)\n spinner.start()\n await apiPost(`/api/v1/sign/${requestId}/cancel`, {}, { authenticated: true })\n spinner.succeed()\n logSuccess(`Signing request ${requestId.slice(0, 8)} cancelled`)\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {b}from'./chunk-FYFPDKJM.js';import {d as d$1}from'./chunk-BC2OVPRV.js';import'./chunk-NDB6KXYI.js';import'./chunk-THMWE2I6.js';import {g}from'./chunk-QT7R3AXE.js';import'./chunk-4NTVRCZM.js';import s from'fs';import c from'path';async function d(o){let n=b("Downloading signed document...");n.start();let t=await d$1(`/api/v1/sign/${o}/download`,{authenticated:true});n.succeed();let e=c.join(process.cwd(),`signed-${t.filename||`${o.slice(0,8)}.pdf`}`);s.writeFileSync(e,Buffer.from(t.content,"base64")),g(`Downloaded to ${e}`);}export{d as default};//# sourceMappingURL=sign-download-FS5G6J27.js.map
|
|
2
|
+
//# sourceMappingURL=sign-download-FS5G6J27.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/commands/sign/sign-download.ts"],"names":["signDownload","requestId","spinner","createSpinner","data","apiGet","filePath","path","fs","logSuccess"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/commands/sign/sign-download.ts"],"names":["signDownload","requestId","spinner","createSpinner","data","apiGet","filePath","path","fs","logSuccess"],"mappings":"6OAMA,eAAOA,CAAAA,CAAoCC,CAAAA,CAAkC,CAC3E,IAAMC,CAAAA,CAAUC,CAAAA,CAAc,gCAAgC,CAAA,CAC9DD,CAAAA,CAAQ,KAAA,EAAM,CACd,IAAME,CAAAA,CAAO,MAAMC,GAAAA,CAA8C,CAAA,aAAA,EAAgBJ,CAAS,CAAA,SAAA,CAAA,CAAa,CAAE,aAAA,CAAe,IAAK,CAAC,CAAA,CAC9HC,EAAQ,OAAA,EAAQ,CAChB,IAAMI,CAAAA,CAAWC,CAAAA,CAAK,IAAA,CAAK,OAAA,CAAQ,GAAA,EAAI,CAAG,CAAA,OAAA,EAAUH,CAAAA,CAAK,QAAA,EAAY,CAAA,EAAGH,CAAAA,CAAU,KAAA,CAAM,CAAA,CAAG,CAAC,CAAC,CAAA,IAAA,CAAM,CAAA,CAAE,CAAA,CACrGO,CAAAA,CAAG,aAAA,CAAcF,CAAAA,CAAU,MAAA,CAAO,KAAKF,CAAAA,CAAK,OAAA,CAAS,QAAQ,CAAC,CAAA,CAC9DK,CAAAA,CAAW,CAAA,cAAA,EAAiBH,CAAQ,EAAE,EACxC","file":"sign-download-FS5G6J27.js","sourcesContent":["import fs from 'node:fs'\nimport path from 'node:path'\nimport { apiGet } from '../../lib/api/client.js'\nimport { createSpinner } from '../../lib/output/spinner.js'\nimport { logSuccess } from '../../lib/output/logger.js'\n\nexport default async function signDownload(requestId: string): Promise<void> {\n const spinner = createSpinner('Downloading signed document...')\n spinner.start()\n const data = await apiGet<{ content: string; filename: string }>(`/api/v1/sign/${requestId}/download`, { authenticated: true })\n spinner.succeed()\n const filePath = path.join(process.cwd(), `signed-${data.filename || `${requestId.slice(0, 8)}.pdf`}`)\n fs.writeFileSync(filePath, Buffer.from(data.content, 'base64'))\n logSuccess(`Downloaded to ${filePath}`)\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {b}from'./chunk-FYFPDKJM.js';import {e}from'./chunk-BC2OVPRV.js';import'./chunk-NDB6KXYI.js';import'./chunk-THMWE2I6.js';import {f as f$1,m as m$1,g}from'./chunk-QT7R3AXE.js';import'./chunk-4NTVRCZM.js';import f from'fs';import m from'path';async function l(u,e$1){let t=m.resolve(u);f.existsSync(t)||(console.error(`File not found: ${t}`),process.exit(1));let d=f.readFileSync(t),g$1=Array.isArray(e$1.to)?e$1.to:e$1.to?[e$1.to]:[],r=b("Sending signing request...");r.start();let o=await e("/api/v1/sign/request",{filename:m.basename(t),content:d.toString("base64"),recipients:g$1,ordered:e$1.order||false},{authenticated:true});if(r.succeed(),f$1()){m$1(o);return}g(`Signing request sent (${o.request_id.slice(0,8)})`);}export{l as default};//# sourceMappingURL=sign-request-VVFYWT3Y.js.map
|
|
2
|
+
//# sourceMappingURL=sign-request-VVFYWT3Y.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/commands/sign/sign-request.ts"],"names":["signRequest","file","options","filePath","path","fs","content","to","spinner","createSpinner","result","apiPost","isJsonMode","logJSON","logSuccess"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/commands/sign/sign-request.ts"],"names":["signRequest","file","options","filePath","path","fs","content","to","spinner","createSpinner","result","apiPost","isJsonMode","logJSON","logSuccess"],"mappings":"wPAOA,eAAOA,CAAAA,CAAmCC,CAAAA,CAAcC,GAAAA,CAAqE,CAC3H,IAAMC,CAAAA,CAAWC,EAAK,OAAA,CAAQH,CAAI,CAAA,CAC7BI,CAAAA,CAAG,UAAA,CAAWF,CAAQ,IACzB,OAAA,CAAQ,KAAA,CAAM,CAAA,gBAAA,EAAmBA,CAAQ,CAAA,CAAE,CAAA,CAC3C,QAAQ,IAAA,CAAK,CAAC,CAAA,CAAA,CAGhB,IAAMG,CAAAA,CAAUD,CAAAA,CAAG,aAAaF,CAAQ,CAAA,CAClCI,GAAAA,CAAK,KAAA,CAAM,OAAA,CAAQL,GAAAA,CAAQ,EAAE,CAAA,CAAIA,GAAAA,CAAQ,EAAA,CAAKA,GAAAA,CAAQ,EAAA,CAAK,CAACA,IAAQ,EAAE,CAAA,CAAI,EAAC,CAE3EM,CAAAA,CAAUC,CAAAA,CAAc,4BAA4B,CAAA,CAC1DD,CAAAA,CAAQ,KAAA,EAAM,CAEd,IAAME,CAAAA,CAAS,MAAMC,CAAAA,CAAgC,sBAAA,CAAwB,CAC3E,QAAA,CAAUP,CAAAA,CAAK,QAAA,CAASD,CAAQ,CAAA,CAChC,OAAA,CAASG,CAAAA,CAAQ,QAAA,CAAS,QAAQ,CAAA,CAClC,WAAYC,GAAAA,CACZ,OAAA,CAASL,GAAAA,CAAQ,KAAA,EAAS,KAC5B,CAAA,CAAG,CAAE,aAAA,CAAe,IAAK,CAAC,CAAA,CAG1B,GADAM,CAAAA,CAAQ,SAAQ,CACZI,GAAAA,EAAW,CAAG,CAChBC,GAAAA,CAAQH,CAAM,EACd,MACF,CACAI,CAAAA,CAAW,CAAA,sBAAA,EAAyBJ,CAAAA,CAAO,UAAA,CAAW,MAAM,CAAA,CAAG,CAAC,CAAC,CAAA,CAAA,CAAG,EACtE","file":"sign-request-VVFYWT3Y.js","sourcesContent":["import fs from 'node:fs'\nimport path from 'node:path'\nimport { apiPost } from '../../lib/api/client.js'\nimport { createSpinner } from '../../lib/output/spinner.js'\nimport { logSuccess, logJSON } from '../../lib/output/logger.js'\nimport { isJsonMode } from '../../lib/output/logger.js'\n\nexport default async function signRequest(file: string, options: { to?: string | string[]; order?: boolean }): Promise<void> {\n const filePath = path.resolve(file)\n if (!fs.existsSync(filePath)) {\n console.error(`File not found: ${filePath}`)\n process.exit(1)\n }\n\n const content = fs.readFileSync(filePath)\n const to = Array.isArray(options.to) ? options.to : options.to ? [options.to] : []\n\n const spinner = createSpinner('Sending signing request...')\n spinner.start()\n\n const result = await apiPost<{ request_id: string }>('/api/v1/sign/request', {\n filename: path.basename(filePath),\n content: content.toString('base64'),\n recipients: to,\n ordered: options.order || false,\n }, { authenticated: true })\n\n spinner.succeed()\n if (isJsonMode()) {\n logJSON(result)\n return\n }\n logSuccess(`Signing request sent (${result.request_id.slice(0, 8)})`)\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {b}from'./chunk-FYFPDKJM.js';import {d}from'./chunk-BC2OVPRV.js';import'./chunk-NDB6KXYI.js';import'./chunk-THMWE2I6.js';import {b as b$1}from'./chunk-G4JU7IUC.js';import {f,m,l}from'./chunk-QT7R3AXE.js';import'./chunk-4NTVRCZM.js';import t from'chalk';async function u(m$1){let r=b("Checking status...");r.start();let c=await d(`/api/v1/sign/${m$1}`,{authenticated:true});r.stop();let i=c.request;if(f()){m(i);return}l(""),l(` ${t.bold(i.filename)}`),l(t.dim(" \u2500\u2500\u2500".repeat(8))),l(` ${t.bold("Status:")} ${i.status==="completed"?t.green("completed"):i.status==="pending"?t.yellow("pending"):t.dim(i.status)}`),l(` ${t.bold("Created:")} ${b$1(i.created_at)}`),l("");for(let n of i.recipients){let l$1=n.signed?t.green("\u2713"):t.yellow("\u25CB"),p=n.signed_at?b$1(n.signed_at):t.dim("pending");l(` ${l$1} ${n.email} \u2014 ${p}`);}l("");}export{u as default};//# sourceMappingURL=sign-status-LKG5UFBX.js.map
|
|
2
|
+
//# sourceMappingURL=sign-status-LKG5UFBX.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/commands/sign/sign-status.ts"],"names":["signStatus","requestId","spinner","createSpinner","data","apiGet","r","isJsonMode","logJSON","logRaw","chalk","formatDate","rec","icon","time"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/commands/sign/sign-status.ts"],"names":["signStatus","requestId","spinner","createSpinner","data","apiGet","r","isJsonM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I,MAAA,CAASF,CAAAA,CAAM,KAAA,CAAM,QAAG,CAAA,CAAIA,CAAAA,CAAM,MAAA,CAAO,QAAG,EACvDI,CAAAA,CAAOF,CAAAA,CAAI,SAAA,CAAYD,GAAAA,CAAWC,EAAI,SAAS,CAAA,CAAIF,CAAAA,CAAM,GAAA,CAAI,SAAS,CAAA,CAC5ED,CAAAA,CAAO,CAAA,EAAA,EAAKI,GAAI,CAAA,CAAA,EAAID,CAAAA,CAAI,KAAK,CAAA,QAAA,EAAME,CAAI,CAAA,CAAE,EAC3C,CACAL,CAAAA,CAAO,EAAE,EACX","file":"sign-status-LKG5UFBX.js","sourcesContent":["import { apiGet } from '../../lib/api/client.js'\nimport { createSpinner } from '../../lib/output/spinner.js'\nimport { logJSON, logRaw } from '../../lib/output/logger.js'\nimport { isJsonMode } from '../../lib/output/logger.js'\nimport { formatDate } from '../../lib/utils/format.js'\nimport chalk from 'chalk'\n\ninterface SignStatus {\n id: string\n filename: string\n status: string\n recipients: { email: string; signed: boolean; signed_at: string | null }[]\n created_at: string\n}\n\nexport default async function signStatus(requestId: string): Promise<void> {\n const spinner = createSpinner('Checking status...')\n spinner.start()\n const data = await apiGet<{ request: SignStatus }>(`/api/v1/sign/${requestId}`, { authenticated: true })\n spinner.stop()\n const r = data.request\n\n if (isJsonMode()) {\n logJSON(r)\n return\n }\n\n logRaw('')\n logRaw(` ${chalk.bold(r.filename)}`)\n logRaw(chalk.dim(' ───'.repeat(8)))\n logRaw(` ${chalk.bold('Status:')} ${r.status === 'completed' ? chalk.green('completed') : r.status === 'pending' ? chalk.yellow('pending') : chalk.dim(r.status)}`)\n logRaw(` ${chalk.bold('Created:')} ${formatDate(r.created_at)}`)\n logRaw('')\n for (const rec of r.recipients) {\n const icon = rec.signed ? chalk.green('✓') : chalk.yellow('○')\n const time = rec.signed_at ? formatDate(rec.signed_at) : chalk.dim('pending')\n logRaw(` ${icon} ${rec.email} — ${time}`)\n }\n logRaw('')\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {b}from'./chunk-FYFPDKJM.js';import {e}from'./chunk-BC2OVPRV.js';import'./chunk-NDB6KXYI.js';import'./chunk-THMWE2I6.js';import {g as g$1,h}from'./chunk-QT7R3AXE.js';import'./chunk-4NTVRCZM.js';import c from'fs';import g from'path';import i from'chalk';async function p(f){let e$1=g.resolve(f);c.existsSync(e$1)||(console.error(`File not found: ${e$1}`),process.exit(1));let n=b("Verifying signatures...");n.start();let m=c.readFileSync(e$1),r=await e("/api/v1/sign/verify",{content:m.toString("base64"),filename:g.basename(e$1)});n.stop(),r.valid?g$1(i.green("All signatures valid \u2713")):h(i.red("Document has been modified or signatures are invalid"));for(let o of r.signatures||[]){let d=o.valid?i.green("\u2713"):i.red("\u2717");console.log(` ${d} ${o.email} \u2014 ${o.signed_at||"unknown"}`);}}export{p as default};//# sourceMappingURL=sign-verify-CVTTJSDL.js.map
|
|
2
|
+
//# sourceMappingURL=sign-verify-CVTTJSDL.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/commands/sign/sign-verify.ts"],"names":["signVerify","file","filePath","path","fs","spinner","createSpinner","content","result","apiPost","logSuccess","chalk","logError","sig","icon"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/commands/sign/sign-verify.ts"],"names":["signVerify","file","filePath","path","fs","spinner","createSpinner","content","result","apiPost","logSuccess","chalk","logError","sig","icon"],"mappings":"oQAOA,eAAOA,CAAAA,CAAkCC,CAAAA,CAA6B,CACpE,IAAMC,GAAAA,CAAWC,CAAAA,CAAK,OAAA,CAAQF,CAAI,CAAA,CAC7BG,CAAAA,CAAG,UAAA,CAAWF,GAAQ,CAAA,GACzB,OAAA,CAAQ,KAAA,CAAM,CAAA,gBAAA,EAAmBA,GAAQ,CAAA,CAAE,EAC3C,OAAA,CAAQ,IAAA,CAAK,CAAC,CAAA,CAAA,CAGhB,IAAMG,CAAAA,CAAUC,EAAc,yBAAyB,CAAA,CACvDD,CAAAA,CAAQ,KAAA,EAAM,CAEd,IAAME,EAAUH,CAAAA,CAAG,YAAA,CAAaF,GAAQ,CAAA,CAClCM,CAAAA,CAAS,MAAMC,CAAAA,CACnB,qBAAA,CACA,CAAE,OAAA,CAASF,CAAAA,CAAQ,QAAA,CAAS,QAAQ,CAAA,CAAG,SAAUJ,CAAAA,CAAK,QAAA,CAASD,GAAQ,CAAE,CAC3E,CAAA,CAEAG,EAAQ,IAAA,EAAK,CACTG,CAAAA,CAAO,KAAA,CACTE,GAAAA,CAAWC,CAAAA,CAAM,MAAM,6BAAwB,CAAC,CAAA,CAEhDC,CAAAA,CAASD,CAAAA,CAAM,GAAA,CAAI,sDAAsD,CAAC,CAAA,CAG5E,IAAA,IAAWE,CAAAA,IAAOL,CAAAA,CAAO,UAAA,EAAc,GAAI,CACzC,IAAMM,CAAAA,CAAOD,CAAAA,CAAI,KAAA,CAAQF,CAAAA,CAAM,MAAM,QAAG,CAAA,CAAIA,CAAAA,CAAM,GAAA,CAAI,QAAG,CAAA,CACzD,QAAQ,GAAA,CAAI,CAAA,EAAA,EAAKG,CAAI,CAAA,CAAA,EAAID,CAAAA,CAAI,KAAK,CAAA,QAAA,EAAMA,CAAAA,CAAI,SAAA,EAAa,SAAS,CAAA,CAAE,EACtE,CACF","file":"sign-verify-CVTTJSDL.js","sourcesContent":["import fs from 'node:fs'\nimport path from 'node:path'\nimport { apiPost } from '../../lib/api/client.js'\nimport { createSpinner } from '../../lib/output/spinner.js'\nimport { logSuccess, logError, logJSON } from '../../lib/output/logger.js'\nimport chalk from 'chalk'\n\nexport default async function signVerify(file: string): Promise<void> {\n const filePath = path.resolve(file)\n if (!fs.existsSync(filePath)) {\n console.error(`File not found: ${filePath}`)\n process.exit(1)\n }\n\n const spinner = createSpinner('Verifying signatures...')\n spinner.start()\n\n const content = fs.readFileSync(filePath)\n const result = await apiPost<{ valid: boolean; signatures: { email: string; valid: boolean; signed_at: string }[] }>(\n '/api/v1/sign/verify',\n { content: content.toString('base64'), filename: path.basename(filePath) },\n )\n\n spinner.stop()\n if (result.valid) {\n logSuccess(chalk.green('All signatures valid ✓'))\n } else {\n logError(chalk.red('Document has been modified or signatures are invalid'))\n }\n\n for (const sig of result.signatures || []) {\n const icon = sig.valid ? chalk.green('✓') : chalk.red('✗')\n console.log(` ${icon} ${sig.email} — ${sig.signed_at || 'unknown'}`)\n }\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {b}from'./chunk-FYFPDKJM.js';import {g}from'./chunk-BC2OVPRV.js';import'./chunk-NDB6KXYI.js';import'./chunk-THMWE2I6.js';import {g as g$1}from'./chunk-QT7R3AXE.js';import'./chunk-4NTVRCZM.js';import m from'inquirer';async function s(e){let{confirm:a}=await m.prompt([{type:"input",name:"confirm",message:`Type "${e}" to permanently delete this site and all its files:`,validate:o=>o===e?true:"Type the exact slug to confirm"}]);if(a!==e)return;let t=b(`Permanently deleting ${e}...`);t.start(),await g(`/api/v1/sites/${e}`,{authenticated:true}),t.succeed(),g$1(`Site ${e} and all files permanently deleted`);}export{s as default};//# sourceMappingURL=sites-delete-SUHEQDZQ.js.map
|
|
2
|
+
//# sourceMappingURL=sites-delete-SUHEQDZQ.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/commands/sites/sites-delete.ts"],"names":["sitesDelete","slug","confirm","inquirer","v","spinner","createSpinner","apiDelete","logSuccess"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/commands/sites/sites-delete.ts"],"names":["sitesDelete","slug","confirm","inquirer","v","spinner","createSpinner","apiDelete","logSuccess"],"mappings":"+NAKA,eAAOA,CAAAA,CAAmCC,CAAAA,CAA6B,CACrE,GAAM,CAAE,OAAA,CAAAC,CAAQ,CAAA,CAAI,MAAMC,EAAS,MAAA,CAAO,CAAC,CACzC,IAAA,CAAM,OAAA,CACN,IAAA,CAAM,SAAA,CACN,OAAA,CAAS,CAAA,MAAA,EAASF,CAAI,CAAA,oDAAA,CAAA,CACtB,QAAA,CAAWG,CAAAA,EAAcA,CAAAA,GAAMH,CAAAA,CAAO,IAAA,CAAO,gCAC/C,CAAC,CAAC,CAAA,CACF,GAAIC,CAAAA,GAAYD,CAAAA,CAAM,OAEtB,IAAMI,CAAAA,CAAUC,CAAAA,CAAc,CAAA,qBAAA,EAAwBL,CAAI,CAAA,GAAA,CAAK,CAAA,CAC/DI,CAAAA,CAAQ,KAAA,GACR,MAAME,CAAAA,CAAU,CAAA,cAAA,EAAiBN,CAAI,CAAA,CAAA,CAAI,CAAE,aAAA,CAAe,IAAK,CAAC,CAAA,CAChEI,CAAAA,CAAQ,OAAA,EAAQ,CAChBG,GAAAA,CAAW,CAAA,KAAA,EAAQP,CAAI,oCAAoC,EAC7D","file":"sites-delete-SUHEQDZQ.js","sourcesContent":["import inquirer from 'inquirer'\nimport { apiDelete } from '../../lib/api/client.js'\nimport { createSpinner } from '../../lib/output/spinner.js'\nimport { logSuccess } from '../../lib/output/logger.js'\n\nexport default async function sitesDelete(slug: string): Promise<void> {\n const { confirm } = await inquirer.prompt([{\n type: 'input',\n name: 'confirm',\n message: `Type \"${slug}\" to permanently delete this site and all its files:`,\n validate: (v: string) => v === slug ? true : 'Type the exact slug to confirm',\n }])\n if (confirm !== slug) return\n\n const spinner = createSpinner(`Permanently deleting ${slug}...`)\n spinner.start()\n await apiDelete(`/api/v1/sites/${slug}`, { authenticated: true })\n spinner.succeed()\n logSuccess(`Site ${slug} and all files permanently deleted`)\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {b}from'./chunk-FYFPDKJM.js';import {e}from'./chunk-BC2OVPRV.js';import'./chunk-NDB6KXYI.js';import'./chunk-THMWE2I6.js';import {g}from'./chunk-QT7R3AXE.js';import'./chunk-4NTVRCZM.js';async function c(e$1){let r=b(`Purging CDN cache for ${e$1}...`);r.start(),await e(`/api/v1/sites/${e$1}/purge`,{},{authenticated:true}),r.succeed(),g(`CDN cache purged for ${e$1}`);}export{c as default};//# sourceMappingURL=sites-purge-VHERQRUB.js.map
|
|
2
|
+
//# sourceMappingURL=sites-purge-VHERQRUB.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/commands/sites/sites-purge.ts"],"names":["sitesPurge","slug","spinner","createSpinner","apiPost","logSuccess"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/commands/sites/sites-purge.ts"],"names":["sitesPurge","slug","spinner","createSpinner","apiPost","logSuccess"],"mappings":"gMAIA,eAAOA,CAAAA,CAAkCC,GAAAA,CAA6B,CACpE,IAAMC,EAAUC,CAAAA,CAAc,CAAA,sBAAA,EAAyBF,GAAI,CAAA,GAAA,CAAK,CAAA,CAChEC,CAAAA,CAAQ,KAAA,EAAM,CACd,MAAME,CAAAA,CAAQ,CAAA,cAAA,EAAiBH,GAAI,CAAA,MAAA,CAAA,CAAU,EAAC,CAAG,CAAE,aAAA,CAAe,IAAK,CAAC,CAAA,CACxEC,CAAAA,CAAQ,OAAA,EAAQ,CAChBG,CAAAA,CAAW,CAAA,qBAAA,EAAwBJ,GAAI,EAAE,EAC3C","file":"sites-purge-VHERQRUB.js","sourcesContent":["import { apiPost } from '../../lib/api/client.js'\nimport { createSpinner } from '../../lib/output/spinner.js'\nimport { logSuccess } from '../../lib/output/logger.js'\n\nexport default async function sitesPurge(slug: string): Promise<void> {\n const spinner = createSpinner(`Purging CDN cache for ${slug}...`)\n spinner.start()\n await apiPost(`/api/v1/sites/${slug}/purge`, {}, { authenticated: true })\n spinner.succeed()\n logSuccess(`CDN cache purged for ${slug}`)\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {b}from'./chunk-FYFPDKJM.js';import {e}from'./chunk-BC2OVPRV.js';import'./chunk-NDB6KXYI.js';import'./chunk-THMWE2I6.js';import {g}from'./chunk-QT7R3AXE.js';import'./chunk-4NTVRCZM.js';import s from'inquirer';async function c(t,e$1){let{confirm:a}=await s.prompt([{type:"input",name:"confirm",message:`Type "${t}" to confirm renaming to "${e$1}":`,validate:m=>m===t?true:"Type the exact old slug to confirm"}]);if(a!==t)return;let r=b(`Renaming ${t} to ${e$1}...`);r.start(),await e(`/api/v1/sites/${t}/rename`,{new_slug:e$1},{authenticated:true}),r.succeed(),g(`Site renamed from ${t} to ${e$1}`);}export{c as default};//# sourceMappingURL=sites-rename-MOO6HVW3.js.map
|
|
2
|
+
//# sourceMappingURL=sites-rename-MOO6HVW3.js.map
|