@proofkit/cli 2.0.0-beta.21 → 2.0.0-beta.23
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/CHANGELOG.md +46 -0
- package/dist/add-DrcID6d6.js +57 -0
- package/dist/add-DrcID6d6.js.map +1 -0
- package/dist/addPackageDependency-BGZl7xc5.js +4 -0
- package/dist/addPackageDependency-BGZl7xc5.js.map +1 -0
- package/dist/consts-BZnOMxpW.js +10 -0
- package/dist/consts-BZnOMxpW.js.map +1 -0
- package/dist/deploy-D25sPO7K.js +34 -0
- package/dist/deploy-D25sPO7K.js.map +1 -0
- package/dist/fmdapi-BO4QL0F8.js +2 -0
- package/dist/fmdapi-BO4QL0F8.js.map +1 -0
- package/dist/fmdapi-DyRYZWzI.js +3 -0
- package/dist/fmdapi-DyRYZWzI.js.map +1 -0
- package/dist/getUserPkgManager-Cph_6l1P.js +2 -0
- package/dist/getUserPkgManager-Cph_6l1P.js.map +1 -0
- package/dist/globalOptions-CkqEi9uC.js +2 -0
- package/dist/globalOptions-CkqEi9uC.js.map +1 -0
- package/dist/index-DALPpGd1.d.ts +366 -0
- package/dist/index-DALPpGd1.d.ts.map +1 -0
- package/dist/index.js +10 -157
- package/dist/index.js.map +1 -1
- package/dist/logger-DCEXcH26.js +2 -0
- package/dist/logger-DCEXcH26.js.map +1 -0
- package/dist/parseSettings-DJ2m9sgJ.js +2 -0
- package/dist/parseSettings-DJ2m9sgJ.js.map +1 -0
- package/dist/proofkit-webviewer-73IB1OBU.js +2 -0
- package/dist/proofkit-webviewer-73IB1OBU.js.map +1 -0
- package/dist/remove-BOCU6In3.js +2 -0
- package/dist/remove-BOCU6In3.js.map +1 -0
- package/dist/state-BVEcvFT3.js +41 -0
- package/dist/state-BVEcvFT3.js.map +1 -0
- package/dist/typegen-DyXaif5O.js +2 -0
- package/dist/typegen-DyXaif5O.js.map +1 -0
- package/dist/update-FX71y5b3.js +7 -0
- package/dist/update-FX71y5b3.js.map +1 -0
- package/dist/utils-DymV7zmv.js +3 -0
- package/dist/utils-DymV7zmv.js.map +1 -0
- package/package.json +18 -8
- package/template/fm-addon/ProofKitWV/de.xml +517 -20
- package/template/fm-addon/ProofKitWV/en.xml +517 -20
- package/template/fm-addon/ProofKitWV/es.xml +517 -20
- package/template/fm-addon/ProofKitWV/fr.xml +517 -20
- package/template/fm-addon/ProofKitWV/icon.png +0 -0
- package/template/fm-addon/ProofKitWV/icon@2x.png +0 -0
- package/template/fm-addon/ProofKitWV/info.json +9 -6
- package/template/fm-addon/ProofKitWV/info_de.json +12 -5
- package/template/fm-addon/ProofKitWV/info_en.json +16 -5
- package/template/fm-addon/ProofKitWV/info_es.json +12 -5
- package/template/fm-addon/ProofKitWV/info_fr.json +12 -5
- package/template/fm-addon/ProofKitWV/info_it.json +12 -5
- package/template/fm-addon/ProofKitWV/info_ja.json +12 -5
- package/template/fm-addon/ProofKitWV/info_ko.json +12 -5
- package/template/fm-addon/ProofKitWV/info_nl.json +12 -5
- package/template/fm-addon/ProofKitWV/info_pt.json +12 -5
- package/template/fm-addon/ProofKitWV/info_sv.json +12 -5
- package/template/fm-addon/ProofKitWV/info_zh.json +12 -5
- package/template/fm-addon/ProofKitWV/it.xml +517 -20
- package/template/fm-addon/ProofKitWV/ja.xml +517 -20
- package/template/fm-addon/ProofKitWV/ko.xml +517 -20
- package/template/fm-addon/ProofKitWV/nl.xml +517 -20
- package/template/fm-addon/ProofKitWV/preview.png +0 -0
- package/template/fm-addon/ProofKitWV/pt.xml +517 -20
- package/template/fm-addon/ProofKitWV/records_de.xml +0 -0
- package/template/fm-addon/ProofKitWV/records_en.xml +0 -0
- package/template/fm-addon/ProofKitWV/records_es.xml +0 -0
- package/template/fm-addon/ProofKitWV/records_fr.xml +0 -0
- package/template/fm-addon/ProofKitWV/records_it.xml +0 -0
- package/template/fm-addon/ProofKitWV/records_ja.xml +0 -0
- package/template/fm-addon/ProofKitWV/records_ko.xml +0 -0
- package/template/fm-addon/ProofKitWV/records_nl.xml +0 -0
- package/template/fm-addon/ProofKitWV/records_pt.xml +0 -0
- package/template/fm-addon/ProofKitWV/records_sv.xml +0 -0
- package/template/fm-addon/ProofKitWV/records_zh.xml +0 -0
- package/template/fm-addon/ProofKitWV/sv.xml +517 -20
- package/template/fm-addon/ProofKitWV/template.xml +0 -0
- package/template/fm-addon/ProofKitWV/zh.xml +517 -20
- package/template/nextjs-mantine/AGENTS.md +1 -0
- package/template/nextjs-mantine/package.json +2 -3
- package/template/nextjs-shadcn/AGENTS.md +1 -0
- package/template/nextjs-shadcn/package.json +3 -4
- package/template/vite-wv/.claude/launch.json +18 -0
- package/template/vite-wv/AGENTS.md +1 -0
- package/template/vite-wv/_gitignore +1 -0
- package/template/vite-wv/components.json +6 -6
- package/template/vite-wv/index.html +2 -2
- package/template/vite-wv/package.json +20 -37
- package/template/vite-wv/proofkit-typegen.config.jsonc +18 -0
- package/template/vite-wv/proofkit.json +4 -1
- package/template/vite-wv/scripts/filemaker.js +96 -0
- package/template/vite-wv/scripts/launch-fm.js +19 -0
- package/template/vite-wv/scripts/upload.js +17 -14
- package/template/vite-wv/src/App.tsx +84 -0
- package/template/vite-wv/src/index.css +96 -0
- package/template/vite-wv/src/lib/utils.ts +6 -0
- package/template/vite-wv/src/main.tsx +14 -35
- package/template/vite-wv/src/router.tsx +57 -0
- package/template/vite-wv/src/routes/query-demo.tsx +37 -0
- package/template/vite-wv/tsconfig.json +3 -1
- package/template/vite-wv/vite.config.ts +5 -5
- package/dist/index-JtcdNmdz.d.ts +0 -1
- package/template/vite-wv/pnpm-lock.yaml +0 -2294
- package/template/vite-wv/postcss.config.cjs +0 -15
- package/template/vite-wv/scripts/launch-fm.sh +0 -3
- package/template/vite-wv/src/components/AppLogo.tsx +0 -5
- package/template/vite-wv/src/components/full-screen-loader.tsx +0 -9
- package/template/vite-wv/src/config/env.ts +0 -16
- package/template/vite-wv/src/config/theme/globals.css +0 -125
- package/template/vite-wv/src/config/theme/mantine-theme.ts +0 -22
- package/template/vite-wv/src/routeTree.gen.ts +0 -111
- package/template/vite-wv/src/routes/__root.tsx +0 -21
- package/template/vite-wv/src/routes/index.tsx +0 -51
- package/template/vite-wv/src/routes/secondary.tsx +0 -26
- package/template/vite-wv/src/utils/notification-helpers.ts +0 -32
- package/template/vite-wv/src/utils/styles.ts +0 -6
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import e from"chalk";const t={error(...t){console.log(e.red(...t))},warn(...t){console.log(e.yellow(...t))},info(...t){console.log(e.cyan(...t))},success(...t){console.log(e.green(...t))},dim(...t){console.log(e.dim(...t))}};export{t};
|
|
2
|
+
//# sourceMappingURL=logger-DCEXcH26.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger-DCEXcH26.js","names":[],"sources":["../src/utils/logger.ts"],"sourcesContent":["import chalk from \"chalk\";\n\nexport const logger = {\n error(...args: unknown[]) {\n console.log(chalk.red(...args));\n },\n warn(...args: unknown[]) {\n console.log(chalk.yellow(...args));\n },\n info(...args: unknown[]) {\n console.log(chalk.cyan(...args));\n },\n success(...args: unknown[]) {\n console.log(chalk.green(...args));\n },\n dim(...args: unknown[]) {\n console.log(chalk.dim(...args));\n },\n};\n"],"mappings":"qBAEA,MAAa,EAAS,CACpB,MAAM,GAAG,EAAiB,CACxB,QAAQ,IAAI,EAAM,IAAI,GAAG,EAAK,CAAC,EAEjC,KAAK,GAAG,EAAiB,CACvB,QAAQ,IAAI,EAAM,OAAO,GAAG,EAAK,CAAC,EAEpC,KAAK,GAAG,EAAiB,CACvB,QAAQ,IAAI,EAAM,KAAK,GAAG,EAAK,CAAC,EAElC,QAAQ,GAAG,EAAiB,CAC1B,QAAQ,IAAI,EAAM,MAAM,GAAG,EAAK,CAAC,EAEnC,IAAI,GAAG,EAAiB,CACtB,QAAQ,IAAI,EAAM,IAAI,GAAG,EAAK,CAAC,EAElC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{_ as e,c as t,d as n,h as r,l as i,m as a,p as o,r as s,s as c,u as l}from"./state-BVEcvFT3.js";import u from"node:path";import d from"fs-extra";var f=e({appTypes:()=>g,dataSourceSchema:()=>h,defaultSettings:()=>v,envNamesSchema:()=>m,getSettings:()=>x,mergeSettings:()=>C,readSettings:()=>S,setSettings:()=>w,validateAndSetEnvFile:()=>T});const p=l(`type`,[o({type:n(`clerk`)}),o({type:n(`next-auth`)}),o({type:n(`proofkit`).transform(()=>`fmaddon`)}),o({type:n(`fmaddon`)}),o({type:n(`better-auth`)}),o({type:n(`none`)})]).default({type:`none`}),m=o({database:a().default(`FM_DATABASE`),server:a().default(`FM_SERVER`),apiKey:a().default(`OTTO_API_KEY`)}),h=l(`type`,[o({type:n(`fm`),name:a(),envNames:m}),o({type:n(`supabase`),name:a()})]),g=[`browser`,`webviewer`],_=l(`ui`,[o({ui:n(`mantine`),appType:c(g).default(`browser`),auth:p,envFile:a().optional(),dataSources:t(h).default([]),tanstackQuery:i().catch(!1),replacedMainPage:i().catch(!1),reactEmail:i().catch(!1),reactEmailServer:i().catch(!1),appliedUpgrades:t(a()).default([]),registryUrl:r().optional(),registryTemplates:t(a()).default([])}),o({ui:n(`shadcn`),appType:c(g).default(`browser`),envFile:a().optional(),dataSources:t(h).default([]),replacedMainPage:i().catch(!1),registryUrl:r().optional(),registryTemplates:t(a()).default([])})]),v=_.parse({auth:{type:`none`},ui:`shadcn`,appType:`browser`,dataSources:[],replacedMainPage:!1,registryTemplates:[]});let y;function b(e){if(!d.existsSync(e))throw Error(`ProofKit settings file not found at: ${e}`);let t=d.readJSONSync(e);return typeof t==`object`&&t&&!(`ui`in t)&&(t={...t,ui:`mantine`}),_.parse(t)}const x=()=>{if(y)return y;let e=b(u.join(s.projectDir,`proofkit.json`));return s.appType=e.appType,y=e,e};function S(e=s.projectDir){return b(u.join(e,`proofkit.json`))}function C(e){let t={...x(),...e};w(_.parse(t))}function w(e){return d.writeJSONSync(u.join(s.projectDir,`proofkit.json`),e,{spaces:2}),y=e,y}function T(e=`.env`){let t=x(),n=u.join(s.projectDir,e);if(d.existsSync(n))return w({...t,envFile:e}),e;if(t.envFile){let{envFile:e,...n}=t;w(n)}}export{S as a,f as i,x as n,w as o,C as r,T as s,v as t};
|
|
2
|
+
//# sourceMappingURL=parseSettings-DJ2m9sgJ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseSettings-DJ2m9sgJ.js","names":["z\n .discriminatedUnion","z.object","z.literal","z.string","z.discriminatedUnion","z.enum","z.array","z.boolean","z.url"],"sources":["../src/utils/parseSettings.ts"],"sourcesContent":["import path from \"node:path\";\nimport fs from \"fs-extra\";\nimport { z } from \"zod/v4\";\n\nimport { state } from \"~/state.js\";\n\nconst authSchema = z\n .discriminatedUnion(\"type\", [\n z.object({\n type: z.literal(\"clerk\"),\n }),\n z.object({\n type: z.literal(\"next-auth\"),\n }),\n z.object({\n type: z.literal(\"proofkit\").transform(() => \"fmaddon\"),\n }),\n z.object({\n type: z.literal(\"fmaddon\"),\n }),\n z.object({\n type: z.literal(\"better-auth\"),\n }),\n z.object({\n type: z.literal(\"none\"),\n }),\n ])\n .default({ type: \"none\" });\n\nexport const envNamesSchema = z.object({\n database: z.string().default(\"FM_DATABASE\"),\n server: z.string().default(\"FM_SERVER\"),\n apiKey: z.string().default(\"OTTO_API_KEY\"),\n});\nexport const dataSourceSchema = z.discriminatedUnion(\"type\", [\n z.object({\n type: z.literal(\"fm\"),\n name: z.string(),\n envNames: envNamesSchema,\n }),\n z.object({\n type: z.literal(\"supabase\"),\n name: z.string(),\n }),\n]);\nexport type DataSource = z.infer<typeof dataSourceSchema>;\n\nexport const appTypes = [\"browser\", \"webviewer\"] as const;\n\nexport const uiTypes = [\"shadcn\", \"mantine\"] as const;\nexport type Ui = (typeof uiTypes)[number];\n\nconst settingsSchema = z.discriminatedUnion(\"ui\", [\n z.object({\n ui: z.literal(\"mantine\"),\n appType: z.enum(appTypes).default(\"browser\"),\n auth: authSchema,\n envFile: z.string().optional(),\n dataSources: z.array(dataSourceSchema).default([]),\n tanstackQuery: z.boolean().catch(false),\n replacedMainPage: z.boolean().catch(false),\n // Whether React Email scaffolding has been installed\n reactEmail: z.boolean().catch(false),\n // Whether provider-specific server email sender files have been installed\n reactEmailServer: z.boolean().catch(false),\n appliedUpgrades: z.array(z.string()).default([]),\n registryUrl: z.url().optional(),\n registryTemplates: z.array(z.string()).default([]),\n }),\n z.object({\n ui: z.literal(\"shadcn\"),\n appType: z.enum(appTypes).default(\"browser\"),\n envFile: z.string().optional(),\n dataSources: z.array(dataSourceSchema).default([]),\n replacedMainPage: z.boolean().catch(false),\n registryUrl: z.url().optional(),\n registryTemplates: z.array(z.string()).default([]),\n }),\n]);\n\nexport const defaultSettings = settingsSchema.parse({\n auth: { type: \"none\" },\n ui: \"shadcn\",\n appType: \"browser\",\n dataSources: [],\n replacedMainPage: false,\n registryTemplates: [],\n});\n\nlet settings: Settings | undefined;\nfunction parseSettingsFile(settingsPath: string) {\n // Check if the settings file exists before trying to read it\n if (!fs.existsSync(settingsPath)) {\n throw new Error(`ProofKit settings file not found at: ${settingsPath}`);\n }\n\n let settingsFile: unknown = fs.readJSONSync(settingsPath);\n\n if (typeof settingsFile === \"object\" && settingsFile !== null && !(\"ui\" in settingsFile)) {\n settingsFile = { ...settingsFile, ui: \"mantine\" };\n }\n\n const parsed = settingsSchema.parse(settingsFile);\n return parsed;\n}\n\nexport const getSettings = () => {\n if (settings) {\n return settings;\n }\n\n const settingsPath = path.join(state.projectDir, \"proofkit.json\");\n const parsed = parseSettingsFile(settingsPath);\n\n state.appType = parsed.appType;\n settings = parsed;\n return parsed;\n};\n\nexport function readSettings(projectDir = state.projectDir) {\n return parseSettingsFile(path.join(projectDir, \"proofkit.json\"));\n}\n\nexport type Settings = z.infer<typeof settingsSchema>;\n\nexport function mergeSettings(_settings: Partial<Settings>) {\n const settings = getSettings();\n const merged = { ...settings, ..._settings };\n const validated = settingsSchema.parse(merged);\n setSettings(validated);\n}\n\nexport function setSettings(_settings: Settings) {\n fs.writeJSONSync(path.join(state.projectDir, \"proofkit.json\"), _settings, {\n spaces: 2,\n });\n settings = _settings;\n return settings;\n}\n\n/**\n * Validates and sets the envFile in settings only if the file exists.\n * Used during stealth initialization to avoid setting non-existent env files.\n */\nexport function validateAndSetEnvFile(envFileName = \".env\") {\n const settings = getSettings();\n const envFilePath = path.join(state.projectDir, envFileName);\n\n if (fs.existsSync(envFilePath)) {\n const updatedSettings = { ...settings, envFile: envFileName };\n setSettings(updatedSettings);\n return envFileName;\n }\n\n // If no env file exists, ensure envFile is undefined in settings\n if (settings.envFile) {\n const { envFile, ...settingsWithoutEnvFile } = settings;\n setSettings(settingsWithoutEnvFile as Settings);\n }\n\n return undefined;\n}\n"],"mappings":"2VAMA,MAAM,EAAaA,EACG,OAAQ,CAC1BC,EAAS,CACP,KAAMC,EAAU,QAAQ,CACzB,CAAC,CACFD,EAAS,CACP,KAAMC,EAAU,YAAY,CAC7B,CAAC,CACFD,EAAS,CACP,KAAMC,EAAU,WAAW,CAAC,cAAgB,UAAU,CACvD,CAAC,CACFD,EAAS,CACP,KAAMC,EAAU,UAAU,CAC3B,CAAC,CACFD,EAAS,CACP,KAAMC,EAAU,cAAc,CAC/B,CAAC,CACFD,EAAS,CACP,KAAMC,EAAU,OAAO,CACxB,CAAC,CACH,CAAC,CACD,QAAQ,CAAE,KAAM,OAAQ,CAAC,CAEf,EAAiBD,EAAS,CACrC,SAAUE,GAAU,CAAC,QAAQ,cAAc,CAC3C,OAAQA,GAAU,CAAC,QAAQ,YAAY,CACvC,OAAQA,GAAU,CAAC,QAAQ,eAAe,CAC3C,CAAC,CACW,EAAmBC,EAAqB,OAAQ,CAC3DH,EAAS,CACP,KAAMC,EAAU,KAAK,CACrB,KAAMC,GAAU,CAChB,SAAU,EACX,CAAC,CACFF,EAAS,CACP,KAAMC,EAAU,WAAW,CAC3B,KAAMC,GAAU,CACjB,CAAC,CACH,CAAC,CAGW,EAAW,CAAC,U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,GAAI,UAAW,EAGpC,EAAe,MAAM,EAAa,CAInD,MAAa,MAAoB,CAC/B,GAAI,EACF,OAAO,EAIT,IAAM,EAAS,EADM,EAAK,KAAK,EAAM,WAAY,gBAAgB,CACnB,CAI9C,MAFA,GAAM,QAAU,EAAO,QACvB,EAAW,EACJ,GAGT,SAAgB,EAAa,EAAa,EAAM,WAAY,CAC1D,OAAO,EAAkB,EAAK,KAAK,EAAY,gBAAgB,CAAC,CAKlE,SAAgB,EAAc,EAA8B,CAE1D,IAAM,EAAS,CAAE,GADA,GAAa,CACA,GAAG,EAAW,CAE5C,EADkB,EAAe,MAAM,EAAO,CACxB,CAGxB,SAAgB,EAAY,EAAqB,CAK/C,OAJA,EAAG,cAAc,EAAK,KAAK,EAAM,WAAY,gBAAgB,CAAE,EAAW,CACxE,OAAQ,EACT,CAAC,CACF,EAAW,EACJ,EAOT,SAAgB,EAAsB,EAAc,OAAQ,CAC1D,IAAM,EAAW,GAAa,CACxB,EAAc,EAAK,KAAK,EAAM,WAAY,EAAY,CAE5D,GAAI,EAAG,WAAW,EAAY,CAG5B,OADA,EADwB,CAAE,GAAG,EAAU,QAAS,EAAa,CACjC,CACrB,EAIT,GAAI,EAAS,QAAS,CACpB,GAAM,CAAE,UAAS,GAAG,GAA2B,EAC/C,EAAY,EAAmC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as e}from"./state-BVEcvFT3.js";import"./consts-BZnOMxpW.js";import"./logger-DCEXcH26.js";import{a as t}from"./parseSettings-DJ2m9sgJ.js";import{i as n,n as r,r as i}from"./fmdapi-BO4QL0F8.js";import a from"node:path";import o from"chalk";import s from"dotenv";async function c(i=e.projectDir){let o=t(i),c=await n({addonName:`wv`}),l=o.dataSources.filter(e=>e.type===`fm`).find(e=>e.name===`filemaker`);if(!l)return{inspection:c};o.envFile&&s.config({path:a.join(i,o.envFile)});let u=process.env[l.envNames.apiKey],d=process.env[l.envNames.database],f=process.env[l.envNames.server];if(!(u&&d&&f))return{inspection:c};let p=await r({dataApiKey:u,fmFile:d,server:f});return{hasRequiredLayouts:[`ProofKitWV`].every(e=>p.some(t=>t===e)),inspection:c}}function l({hasRequiredLayouts:e,inspection:t}){let n={info:[],warn:[],nextSteps:[]};if(e&&n.info.push(`Successfully detected all required layouts for ProofKit WebViewer in your FileMaker file.`),t.status===`installed-outdated`){let e=t.installedVersion&&t.bundledVersion?` Local version: ${t.installedVersion}. Bundled version: ${t.bundledVersion}.`:``;n.warn.push(`New ProofKit WebViewer add-on available. Run \`${t.installCommand}\` to update the local add-on files.${e}`),n.nextSteps.push(t.installCommand)}if(t.status===`unknown`&&t.reason===`unsupported-platform`&&n.warn.push(`Could not inspect the local ProofKit WebViewer add-on on this platform.`),e===!1){let e=i(`wv`);n.warn.push(`ProofKit WebViewer layouts were not detected in your FileMaker file. The add-on may not be installed in the file yet.`),t.status===`missing`&&(n.warn.push(`Local ProofKit WebViewer add-on files were not found. Run \`${t.installCommand}\` before installing the add-on into the FileMaker file.`),n.nextSteps.push(t.installCommand)),t.status===`unknown`&&t.reason!==`unsupported-platform`&&(n.warn.push(`Could not determine the local ProofKit WebViewer add-on version. Reinstall it explicitly if you need the latest local files.`),n.nextSteps.push(t.installCommand)),n.info.push(o.bgYellow(` ACTION REQUIRED: `)+` Install or update the ProofKit WebViewer add-on in your FileMaker file. ${o.dim(`(Learn more: ${e.docsUrl})`)}`);for(let t of e.steps)n.info.push(t)}return n}export{c as checkForWebViewerLayouts,l as getWebViewerAddonMessages};
|
|
2
|
+
//# sourceMappingURL=proofkit-webviewer-73IB1OBU.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proofkit-webviewer-73IB1OBU.js","names":[],"sources":["../src/installers/proofkit-webviewer.ts"],"sourcesContent":["import path from \"node:path\";\nimport type { OttoAPIKey } from \"@proofkit/fmdapi\";\nimport chalk from \"chalk\";\nimport dotenv from \"dotenv\";\nimport { getLayouts } from \"~/cli/fmdapi.js\";\nimport { state } from \"~/state.js\";\nimport { readSettings } from \"~/utils/parseSettings.js\";\nimport { type FmAddonInspection, getFmAddonInstallInstructions, inspectFmAddon } from \"./install-fm-addon.js\";\n\nexport interface WebViewerAddonStatus {\n hasRequiredLayouts?: boolean;\n inspection: FmAddonInspection;\n}\n\nexport async function checkForWebViewerLayouts(projectDir = state.projectDir): Promise<WebViewerAddonStatus> {\n const settings = readSettings(projectDir);\n const inspection = await inspectFmAddon({ addonName: \"wv\" });\n\n const dataSource = settings.dataSources\n .filter((s: { type: string }) => s.type === \"fm\")\n .find((s: { name: string; type: string }) => s.name === \"filemaker\") as\n | {\n type: \"fm\";\n name: string;\n envNames: { database: string; server: string; apiKey: string };\n }\n | undefined;\n\n if (!dataSource) {\n return { inspection };\n }\n if (settings.envFile) {\n dotenv.config({\n path: path.join(projectDir, settings.envFile),\n });\n }\n const dataApiKey = process.env[dataSource.envNames.apiKey] as OttoAPIKey | undefined;\n const fmFile = process.env[dataSource.envNames.database];\n const server = process.env[dataSource.envNames.server];\n\n if (!(dataApiKey && fmFile && server)) {\n return { inspection };\n }\n\n const existingLayouts = await getLayouts({\n dataApiKey,\n fmFile,\n server,\n });\n const webviewerLayouts = [\"ProofKitWV\"];\n\n const allWebViewerLayoutsExist = webviewerLayouts.every((layout) =>\n existingLayouts.some((l: string) => l === layout),\n );\n\n return {\n hasRequiredLayouts: allWebViewerLayoutsExist,\n inspection,\n };\n}\n\nexport function getWebViewerAddonMessages({ hasRequiredLayouts, inspection }: WebViewerAddonStatus): {\n info: string[];\n warn: string[];\n nextSteps: string[];\n} {\n const messages = {\n info: [] as string[],\n warn: [] as string[],\n nextSteps: [] as string[],\n };\n\n if (hasRequiredLayouts) {\n messages.info.push(\"Successfully detected all required layouts for ProofKit WebViewer in your FileMaker file.\");\n }\n\n if (inspection.status === \"installed-outdated\") {\n const versionSuffix =\n inspection.installedVersion && inspection.bundledVersion\n ? ` Local version: ${inspection.installedVersion}. Bundled version: ${inspection.bundledVersion}.`\n : \"\";\n messages.warn.push(\n `New ProofKit WebViewer add-on available. Run \\`${inspection.installCommand}\\` to update the local add-on files.${versionSuffix}`,\n );\n messages.nextSteps.push(inspection.installCommand);\n }\n\n if (inspection.status === \"unknown\" && inspection.reason === \"unsupported-platform\") {\n messages.warn.push(\"Could not inspect the local ProofKit WebViewer add-on on this platform.\");\n }\n\n if (hasRequiredLayouts === false) {\n const instructions = getFmAddonInstallInstructions(\"wv\");\n messages.warn.push(\n \"ProofKit WebViewer layouts were not detected in your FileMaker file. The add-on may not be installed in the file yet.\",\n );\n if (inspection.status === \"missing\") {\n messages.warn.push(\n `Local ProofKit WebViewer add-on files were not found. Run \\`${inspection.installCommand}\\` before installing the add-on into the FileMaker file.`,\n );\n messages.nextSteps.push(inspection.installCommand);\n }\n if (inspection.status === \"unknown\" && inspection.reason !== \"unsupported-platform\") {\n messages.warn.push(\n \"Could not determine the local ProofKit WebViewer add-on version. Reinstall it explicitly if you need the latest local files.\",\n );\n messages.nextSteps.push(inspection.installCommand);\n }\n messages.info.push(\n chalk.bgYellow(\" ACTION REQUIRED: \") +\n ` Install or update the ProofKit WebViewer add-on in your FileMaker file. ${chalk.dim(`(Learn more: ${instructions.docsUrl})`)}`,\n );\n for (const step of instructions.steps) {\n messages.info.push(step);\n }\n }\n\n return messages;\n}\n\nexport async function ensureWebViewerAddonInstalled() {\n const status = await checkForWebViewerLayouts();\n const messages = getWebViewerAddonMessages(status);\n\n for (const message of messages.warn) {\n console.log(chalk.yellow(message));\n }\n for (const message of messages.info) {\n console.log(message);\n }\n\n return status;\n}\n"],"mappings":"6QAcA,eAAsB,EAAyB,EAAa,EAAM,WAA2C,CAC3G,IAAM,EAAW,EAAa,EAAW,CACnC,EAAa,MAAM,EAAe,CAAE,UAAW,KAAM,CAAC,CAEtD,EAAa,EAAS,YACzB,OAAQ,GAAwB,EAAE,OAAS,KAAK,CAChD,KAAM,GAAsC,EAAE,OAAS,YAAY,CAQtE,GAAI,CAAC,EACH,MAAO,CAAE,aAAY,CA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,IAAI,gBAAgB,EAAa,QAAQ,GAAG,GACjI,CACD,IAAK,IAAM,KAAQ,EAAa,MAC9B,EAAS,KAAK,KAAK,EAAK,CAI5B,OAAO"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{m as e,n as t,p as n,r,t as i}from"./state-BVEcvFT3.js";import"./consts-BZnOMxpW.js";import{a,c as o,f as s,i as c,l,n as u,o as d,p as f,r as p,t as m}from"./utils-DymV7zmv.js";import{n as h,t as g}from"./globalOptions-CkqEi9uC.js";import"./logger-DCEXcH26.js";import{n as _,o as v}from"./parseSettings-DJ2m9sgJ.js";import{c as y,f as b,l as x,o as S,p as C,u as w}from"./fmdapi-DyRYZWzI.js";import T from"node:path";import E from"fs-extra";import{Command as D}from"commander";import{Node as O,SyntaxKind as k}from"ts-morph";import A from"dotenv";function j(e){if(e.type!==`fm`)return e.type;let t=T.join(r.projectDir,`.env`);E.existsSync(t)&&A.config({path:t});let n=process.env[e.envNames.server]||`unknown server`,i=process.env[e.envNames.database]||`unknown database`;try{return`${new URL(n).hostname}/${i}`}catch(e){return r.debug&&console.error(`Error parsing server URL:`,e),`${n}/${i}`}}const M=async e=>{let n=_();if(n.dataSources.length===0){o(`No data sources found in your project.`);return}let i=e;if(i){if(!n.dataSources.some(e=>e.name===i))throw Error(`Data source "${i}" not found in your project.`)}else i=u(await s({message:`Which data source do you want to remove?`,options:n.dataSources.map(e=>{let t=``;try{t=j(e)}catch(e){r.debug&&console.error(`Error getting data source info:`,e),t=`unknown connection`}return{label:`${e.name} (${t})`,value:e.name}})}));let c=!0;if(!t()&&(c=u(await a({message:`Are you sure you want to remove the data source "${i}"? This will only remove it from your configuration, not replace any possible usage, which may cause TypeScript errors.`})),!c))throw new m;let l=n.dataSources.find(e=>e.name===i);if(n.dataSources=n.dataSources.filter(e=>e.name!==i),v(n),l?.type===`fm`){y({dataSourceName:i}),r.debug&&o(`Removed schemas from fmschema.config.mjs`);let e=T.join(r.projectDir,`src`,`config`,`schemas`,i);E.existsSync(e)&&(E.removeSync(e),r.debug&&o(`Removed schema folder at ${e}`)),await w(),r.debug&&o(`Successfully regenerated types`)}o(`Successfully removed data source "${i}"`)},N=()=>{let t=new D(`data`).description(`Remove a data source from your project`).option(`--name <name>`,`Name of the data source to remove`).addOption(h).addOption(g).action(async t=>{await M(n({name:e().optional()}).parse(t).name)});return t.hook(`preAction`,(e,t)=>{i(t.opts()),r.baseCommand=`remove`,p({commandName:`remove`})}),t},P=e=>{let t=T.join(r.projectDir,`src/app/navigation.tsx`);if(!E.existsSync(t))return[];let n=e.addSourceFileAtPath(t),i=[],a=n.getVariableDeclaration(`primaryRoutes`)?.getInitializerIfKind(k.ArrayLiteralExpression)?.getElements();if(a){for(let e of a)if(O.isObjectLiteralExpression(e)){let t=e.getProperties().find(e=>O.isPropertyAssignment(e)&&e.getName()===`label`),n=e.getProperties().find(e=>O.isPropertyAssignment(e)&&e.getName()===`href`),r=t?.getInitializer()?.getText().replace(/['"]/g,``),a=n?.getInitializer()?.getText().replace(/['"]/g,``);r&&a&&i.push({label:r,href:a})}}let o=n.getVariableDeclaration(`secondaryRoutes`)?.getInitializerIfKind(k.ArrayLiteralExpression)?.getElements();if(o){for(let e of o)if(O.isObjectLiteralExpression(e)){let t=e.getProperties().find(e=>O.isPropertyAssignment(e)&&e.getName()===`label`),n=e.getProperties().find(e=>O.isPropertyAssignment(e)&&e.getName()===`href`),r=t?.getInitializer()?.getText().replace(/['"]/g,``),a=n?.getInitializer()?.getText().replace(/['"]/g,``);r&&a&&i.push({label:r,href:a})}}return i},F=async(e,t)=>{let n=T.join(r.projectDir,`src/app/navigation.tsx`);if(!E.existsSync(n))return;let i=e.addSourceFileAtPath(n),a=i.getVariableDeclaration(`primaryRoutes`)?.getInitializerIfKind(k.ArrayLiteralExpression);if(a){let e=a.getElements();for(let n=e.length-1;n>=0;n--){let r=e[n];O.isObjectLiteralExpression(r)&&r.getProperties().find(e=>O.isPropertyAssignment(e)&&e.getName()===`href`)?.getInitializer()?.getText().replace(/['"]/g,``)===t&&a.removeElement(n)}}let o=i.getVariableDeclaration(`secondaryRoutes`)?.getInitializerIfKind(k.ArrayLiteralExpression);if(o){let e=o.getElements();for(let n=e.length-1;n>=0;n--){let r=e[n];O.isObjectLiteralExpression(r)&&r.getProperties().find(e=>O.isPropertyAssignment(e)&&e.getName()===`href`)?.getInitializer()?.getText().replace(/['"]/g,``)===t&&o.removeElement(n)}}await C(e)},I=async e=>{_();let t=r.projectDir,n=b(t),i=P(n);if(i.length===0)return c(`No pages found in the navigation.`);let a=e;if(!a){if(r.nonInteractive)throw Error(`Route is required in non-interactive mode.`);a=u(await s({message:`Select the page to remove`,options:i.map(e=>({label:`${e.label} (${e.href})`,value:e.href}))}))}a.startsWith(`/`)||(a=`/${a}`);let o=r.appType===`browser`?T.join(t,`src/app/(main)`,a):T.join(t,`src/routes`,a),l=f();l.start(`Removing page`);try{if(!E.existsSync(o))return l.stop(`Page not found!`),c(`Page at ${a} does not exist`);await F(n,a),await E.remove(o),l.stop(`Page removed successfully!`)}catch(e){l.stop(`Failed to remove page!`),console.error(`Error removing page:`,e),process.exit(1)}},L=()=>{let e=new D(`page`).description(`Remove a page from your project`).argument(`[route]`,`The route of the page to remove`).addOption(h).addOption(g).action(async e=>{await I(e)});return e.hook(`preAction`,(e,t)=>{i(t.opts()),r.baseCommand=`remove`,p({commandName:`remove`})}),e},R=async t=>{let n=t?.settings??_(),i=t?.projectDir??r.projectDir,f=t?.sourceName;if(!f&&n.dataSources.filter(e=>e.type===`fm`).length>1){let t=await s({message:`Which FileMaker data source do you want to remove a layout from?`,options:n.dataSources.filter(e=>e.type===`fm`).map(e=>({label:e.name,value:e.name}))});d(t)&&(c(),process.exit(0)),f=e().parse(t)}if(f||=`filemaker`,!n.dataSources.filter(e=>e.type===`fm`).find(e=>e.name===f))throw Error(`FileMaker data source ${f} not found in your ProofKit config`);let p=S({projectDir:i,dataSourceName:f});if(p.length===0){o(`No layouts found in data source "${f}"`,`Nothing to remove`);return}let m=t?.schemaName??u(await s({message:`Select a layout to remove`,options:p.map(e=>({label:`${e.layout} (${e.schemaName})`,value:e.schemaName??``})).filter(e=>e.value!==``)})),h=await a({message:`Are you sure you want to remove the layout "${m}"?`,initialValue:!1});(d(h)||!h)&&(c(`Operation cancelled`),process.exit(0)),await x({projectDir:i,dataSourceName:f,schemaName:m,runCodegen:!0}),l(`Layout "${m}" has been removed from your project`)},z=()=>new D(`layout`).alias(`schema`).description(`Remove a layout from your fmschema file`).action(async e=>{let t=e.settings;await R({settings:t})}),B=async e=>{let t=u(await s({message:`What do you want to remove from your project?`,options:[{label:`Page`,value:`page`},{label:`Schema`,value:`schema`,hint:`remove a table or layout schema`},..._().appType===`browser`?[{label:`Data Source`,value:`data`,hint:`remove a database or FileMaker connection`}]:[]]}));t===`data`?await M():t===`page`?await I():t===`schema`&&await R()};function V(){let e=new D(`remove`).description(`Remove a component from your project`).argument(`[name]`,`Type of component to remove`).addOption(g).action(B);return e.hook(`preAction`,(e,t)=>{i(t.opts()),r.baseCommand=`remove`,p({commandName:`remove`})}),e.hook(`preSubcommand`,(e,t)=>{i(t.opts()),r.baseCommand=`remove`,p({commandName:`remove`})}),e.addCommand(N()),e.addCommand(L()),e.addCommand(z()),e}export{V as makeRemoveCommand,B as runRemove};
|
|
2
|
+
//# sourceMappingURL=remove-BOCU6In3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remove-BOCU6In3.js","names":["p.select","p.confirm","z.object","z.string","p.cancel","p.select","spinner","p.spinner","p.select","p.isCancel","z.string","p.confirm","p.select"],"sources":["../src/cli/remove/data-source.ts","../src/cli/remove/page.ts","../src/cli/remove/schema.ts","../src/cli/remove/index.ts"],"sourcesContent":["import path from \"node:path\";\nimport { Command } from \"commander\";\nimport dotenv from \"dotenv\";\nimport fs from \"fs-extra\";\nimport { z } from \"zod/v4\";\nimport * as p from \"~/cli/prompts.js\";\n\nimport { removeFromFmschemaConfig, runCodegenCommand } from \"~/generators/fmdapi.js\";\nimport { debugOption, nonInteractiveOption } from \"~/globalOptions.js\";\nimport { initProgramState, isNonInteractiveMode, state } from \"~/state.js\";\nimport { type DataSource, getSettings, setSettings } from \"~/utils/parseSettings.js\";\nimport { abortIfCancel, ensureProofKitProject, UserAbortedError } from \"../utils.js\";\n\nfunction getDataSourceInfo(source: DataSource) {\n if (source.type !== \"fm\") {\n return source.type;\n }\n\n const envFile = path.join(state.projectDir, \".env\");\n if (fs.existsSync(envFile)) {\n dotenv.config({ path: envFile });\n }\n\n const server = process.env[source.envNames.server] || \"unknown server\";\n const database = process.env[source.envNames.database] || \"unknown database\";\n\n try {\n // Format the server URL to be more readable\n const serverUrl = new URL(server);\n const formattedServer = serverUrl.hostname;\n return `${formattedServer}/${database}`;\n } catch (error) {\n if (state.debug) {\n console.error(\"Error parsing server URL:\", error);\n }\n return `${server}/${database}`;\n }\n}\n\nexport const runRemoveDataSourceCommand = async (name?: string) => {\n const settings = getSettings();\n\n if (settings.dataSources.length === 0) {\n p.note(\"No data sources found in your project.\");\n return;\n }\n\n let dataSourceName = name;\n\n // If no name provided, prompt for selection\n if (dataSourceName) {\n // Validate that the provided name exists\n const dataSourceExists = settings.dataSources.some((source) => source.name === dataSourceName);\n if (!dataSourceExists) {\n throw new Error(`Data source \"${dataSourceName}\" not found in your project.`);\n }\n } else {\n dataSourceName = abortIfCancel(\n await p.select({\n message: \"Which data source do you want to remove?\",\n options: settings.dataSources.map((source) => {\n let info = \"\";\n try {\n info = getDataSourceInfo(source);\n } catch (error) {\n if (state.debug) {\n console.error(\"Error getting data source info:\", error);\n }\n info = \"unknown connection\";\n }\n return {\n label: `${source.name} (${info})`,\n value: source.name,\n };\n }),\n }),\n );\n }\n\n let confirmed = true;\n if (!isNonInteractiveMode()) {\n confirmed = abortIfCancel(\n await p.confirm({\n message: `Are you sure you want to remove the data source \"${dataSourceName}\"? This will only remove it from your configuration, not replace any possible usage, which may cause TypeScript errors.`,\n }),\n );\n\n if (!confirmed) {\n throw new UserAbortedError();\n }\n }\n\n // Get the data source before removing it\n const dataSource = settings.dataSources.find((source) => source.name === dataSourceName);\n\n // Remove the data source from settings\n settings.dataSources = settings.dataSources.filter((source) => source.name !== dataSourceName);\n\n // Save the updated settings\n setSettings(settings);\n\n if (dataSource?.type === \"fm\") {\n // For FileMaker data sources, remove from fmschema.config.mjs\n removeFromFmschemaConfig({\n dataSourceName,\n });\n\n if (state.debug) {\n p.note(\"Removed schemas from fmschema.config.mjs\");\n }\n\n // Remove the schema folder for this data source\n const schemaFolderPath = path.join(state.projectDir, \"src\", \"config\", \"schemas\", dataSourceName);\n if (fs.existsSync(schemaFolderPath)) {\n fs.removeSync(schemaFolderPath);\n if (state.debug) {\n p.note(`Removed schema folder at ${schemaFolderPath}`);\n }\n }\n\n // Run typegen to regenerate types\n await runCodegenCommand();\n if (state.debug) {\n p.note(\"Successfully regenerated types\");\n }\n }\n\n p.note(`Successfully removed data source \"${dataSourceName}\"`);\n};\n\nexport const makeRemoveDataSourceCommand = () => {\n const removeDataSourceCommand = new Command(\"data\")\n .description(\"Remove a data source from your project\")\n .option(\"--name <name>\", \"Name of the data source to remove\")\n .addOption(nonInteractiveOption)\n .addOption(debugOption)\n .action(async (options) => {\n const schema = z.object({\n name: z.string().optional(),\n });\n const validated = schema.parse(options);\n await runRemoveDataSourceCommand(validated.name);\n });\n\n removeDataSourceCommand.hook(\"preAction\", (_thisCommand, actionCommand) => {\n initProgramState(actionCommand.opts());\n state.baseCommand = \"remove\";\n ensureProofKitProject({ commandName: \"remove\" });\n });\n\n return removeDataSourceCommand;\n};\n","import path from \"node:path\";\nimport { Command } from \"commander\";\nimport fs from \"fs-extra\";\nimport { Node, type Project, type PropertyAssignment, SyntaxKind } from \"ts-morph\";\nimport * as p from \"~/cli/prompts.js\";\n\nimport { debugOption, nonInteractiveOption } from \"~/globalOptions.js\";\nimport { initProgramState, state } from \"~/state.js\";\nimport { getSettings } from \"~/utils/parseSettings.js\";\nimport { formatAndSaveSourceFiles, getNewProject } from \"~/utils/ts-morph.js\";\nimport { abortIfCancel, ensureProofKitProject } from \"../utils.js\";\n\nconst getExistingRoutes = (project: Project): { label: string; href: string }[] => {\n const navFilePath = path.join(state.projectDir, \"src/app/navigation.tsx\");\n\n // If navigation file doesn't exist (e.g., webviewer apps), there are no nav routes to remove\n if (!fs.existsSync(navFilePath)) {\n return [];\n }\n\n const sourceFile = project.addSourceFileAtPath(navFilePath);\n\n const routes: { label: string; href: string }[] = [];\n\n // Get primary routes\n const primaryRoutes = sourceFile\n .getVariableDeclaration(\"primaryRoutes\")\n ?.getInitializerIfKind(SyntaxKind.ArrayLiteralExpression)\n ?.getElements();\n\n if (primaryRoutes) {\n for (const element of primaryRoutes) {\n if (Node.isObjectLiteralExpression(element)) {\n const labelProp = element\n .getProperties()\n .find((prop): prop is PropertyAssignment => Node.isPropertyAssignment(prop) && prop.getName() === \"label\");\n const hrefProp = element\n .getProperties()\n .find((prop): prop is PropertyAssignment => Node.isPropertyAssignment(prop) && prop.getName() === \"href\");\n\n const label = labelProp?.getInitializer()?.getText().replace(/['\"]/g, \"\");\n const href = hrefProp?.getInitializer()?.getText().replace(/['\"]/g, \"\");\n\n if (label && href) {\n routes.push({ label, href });\n }\n }\n }\n }\n\n // Get secondary routes\n const secondaryRoutes = sourceFile\n .getVariableDeclaration(\"secondaryRoutes\")\n ?.getInitializerIfKind(SyntaxKind.ArrayLiteralExpression)\n ?.getElements();\n\n if (secondaryRoutes) {\n for (const element of secondaryRoutes) {\n if (Node.isObjectLiteralExpression(element)) {\n const labelProp = element\n .getProperties()\n .find((prop): prop is PropertyAssignment => Node.isPropertyAssignment(prop) && prop.getName() === \"label\");\n const hrefProp = element\n .getProperties()\n .find((prop): prop is PropertyAssignment => Node.isPropertyAssignment(prop) && prop.getName() === \"href\");\n\n const label = labelProp?.getInitializer()?.getText().replace(/['\"]/g, \"\");\n const href = hrefProp?.getInitializer()?.getText().replace(/['\"]/g, \"\");\n\n if (label && href) {\n routes.push({ label, href });\n }\n }\n }\n }\n\n return routes;\n};\n\nconst removeRouteFromNav = async (project: Project, routeToRemove: string) => {\n const navFilePath = path.join(state.projectDir, \"src/app/navigation.tsx\");\n\n // Skip if there is no navigation file\n if (!fs.existsSync(navFilePath)) {\n return;\n }\n\n const sourceFile = project.addSourceFileAtPath(navFilePath);\n\n // Remove from primary routes\n const primaryRoutes = sourceFile\n .getVariableDeclaration(\"primaryRoutes\")\n ?.getInitializerIfKind(SyntaxKind.ArrayLiteralExpression);\n\n if (primaryRoutes) {\n const elements = primaryRoutes.getElements();\n for (let i = elements.length - 1; i >= 0; i--) {\n const element = elements[i];\n if (Node.isObjectLiteralExpression(element)) {\n const hrefProp = element\n .getProperties()\n .find((prop): prop is PropertyAssignment => Node.isPropertyAssignment(prop) && prop.getName() === \"href\");\n\n const href = hrefProp?.getInitializer()?.getText().replace(/['\"]/g, \"\");\n\n if (href === routeToRemove) {\n primaryRoutes.removeElement(i);\n }\n }\n }\n }\n\n // Remove from secondary routes\n const secondaryRoutes = sourceFile\n .getVariableDeclaration(\"secondaryRoutes\")\n ?.getInitializerIfKind(SyntaxKind.ArrayLiteralExpression);\n\n if (secondaryRoutes) {\n const elements = secondaryRoutes.getElements();\n for (let i = elements.length - 1; i >= 0; i--) {\n const element = elements[i];\n if (Node.isObjectLiteralExpression(element)) {\n const hrefProp = element\n .getProperties()\n .find((prop): prop is PropertyAssignment => Node.isPropertyAssignment(prop) && prop.getName() === \"href\");\n\n const href = hrefProp?.getInitializer()?.getText().replace(/['\"]/g, \"\");\n\n if (href === routeToRemove) {\n secondaryRoutes.removeElement(i);\n }\n }\n }\n }\n\n await formatAndSaveSourceFiles(project);\n};\n\nexport const runRemovePageAction = async (routeName?: string) => {\n const _settings = getSettings();\n const projectDir = state.projectDir;\n const project = getNewProject(projectDir);\n\n // Get existing routes\n const routes = getExistingRoutes(project);\n\n if (routes.length === 0) {\n return p.cancel(\"No pages found in the navigation.\");\n }\n\n let selectedRouteName = routeName;\n if (!selectedRouteName) {\n if (state.nonInteractive) {\n throw new Error(\"Route is required in non-interactive mode.\");\n }\n\n selectedRouteName = abortIfCancel(\n await p.select({\n message: \"Select the page to remove\",\n options: routes.map((route) => ({\n label: `${route.label} (${route.href})`,\n value: route.href,\n })),\n }),\n );\n }\n\n if (!selectedRouteName.startsWith(\"/\")) {\n selectedRouteName = `/${selectedRouteName}`;\n }\n\n const pagePath =\n state.appType === \"browser\"\n ? path.join(projectDir, \"src/app/(main)\", selectedRouteName)\n : path.join(projectDir, \"src/routes\", selectedRouteName);\n\n const spinner = p.spinner();\n spinner.start(\"Removing page\");\n\n try {\n // Check if directory exists\n if (!fs.existsSync(pagePath)) {\n spinner.stop(\"Page not found!\");\n return p.cancel(`Page at ${selectedRouteName} does not exist`);\n }\n\n // Remove from navigation first (if present)\n await removeRouteFromNav(project, selectedRouteName);\n\n // Remove the page directory\n await fs.remove(pagePath);\n\n spinner.stop(\"Page removed successfully!\");\n } catch (error) {\n spinner.stop(\"Failed to remove page!\");\n console.error(\"Error removing page:\", error);\n process.exit(1);\n }\n};\n\nexport const makeRemovePageCommand = () => {\n const removePageCommand = new Command(\"page\")\n .description(\"Remove a page from your project\")\n .argument(\"[route]\", \"The route of the page to remove\")\n .addOption(nonInteractiveOption)\n .addOption(debugOption)\n .action(async (route: string) => {\n await runRemovePageAction(route);\n });\n\n removePageCommand.hook(\"preAction\", (_thisCommand, actionCommand) => {\n initProgramState(actionCommand.opts());\n state.baseCommand = \"remove\";\n ensureProofKitProject({ commandName: \"remove\" });\n });\n\n return removePageCommand;\n};\n","import { Command } from \"commander\";\nimport { z } from \"zod/v4\";\nimport * as p from \"~/cli/prompts.js\";\n\nimport { getExistingSchemas, removeLayout } from \"~/generators/fmdapi.js\";\nimport { state } from \"~/state.js\";\nimport { getSettings, type Settings } from \"~/utils/parseSettings.js\";\nimport { abortIfCancel } from \"../utils.js\";\n\nexport const runRemoveSchemaAction = async (opts?: {\n projectDir?: string;\n settings?: Settings;\n sourceName?: string;\n schemaName?: string;\n}) => {\n const settings = opts?.settings ?? getSettings();\n const projectDir = opts?.projectDir ?? state.projectDir;\n let sourceName = opts?.sourceName;\n\n // If there is more than one fm data source, prompt for which one to remove from\n if (!sourceName && settings.dataSources.filter((s) => s.type === \"fm\").length > 1) {\n const dataSourceName = await p.select({\n message: \"Which FileMaker data source do you want to remove a layout from?\",\n options: settings.dataSources.filter((s) => s.type === \"fm\").map((s) => ({ label: s.name, value: s.name })),\n });\n if (p.isCancel(dataSourceName)) {\n p.cancel();\n process.exit(0);\n }\n sourceName = z.string().parse(dataSourceName);\n }\n\n if (!sourceName) {\n sourceName = \"filemaker\";\n }\n\n const dataSource = settings.dataSources.filter((s) => s.type === \"fm\").find((s) => s.name === sourceName);\n if (!dataSource) {\n throw new Error(`FileMaker data source ${sourceName} not found in your ProofKit config`);\n }\n\n // Get existing schemas for this data source\n const existingSchemas = getExistingSchemas({\n projectDir,\n dataSourceName: sourceName,\n });\n\n if (existingSchemas.length === 0) {\n p.note(`No layouts found in data source \"${sourceName}\"`, \"Nothing to remove\");\n return;\n }\n\n // Show existing schemas and let user pick one to remove\n const schemaToRemove =\n opts?.schemaName ??\n abortIfCancel(\n await p.select({\n message: \"Select a layout to remove\",\n options: existingSchemas\n .map((schema) => ({\n label: `${schema.layout} (${schema.schemaName})`,\n value: schema.schemaName ?? \"\",\n }))\n .filter((opt) => opt.value !== \"\"),\n }),\n );\n\n // Confirm removal\n const confirmRemoval = await p.confirm({\n message: `Are you sure you want to remove the layout \"${schemaToRemove}\"?`,\n initialValue: false,\n });\n\n if (p.isCancel(confirmRemoval) || !confirmRemoval) {\n p.cancel(\"Operation cancelled\");\n process.exit(0);\n }\n\n // Remove the schema\n await removeLayout({\n projectDir,\n dataSourceName: sourceName,\n schemaName: schemaToRemove,\n runCodegen: true,\n });\n\n p.outro(`Layout \"${schemaToRemove}\" has been removed from your project`);\n};\n\nexport const makeRemoveSchemaCommand = () => {\n const removeSchemaCommand = new Command(\"layout\")\n .alias(\"schema\")\n .description(\"Remove a layout from your fmschema file\")\n .action(async (opts: { settings: Settings }) => {\n const settings = opts.settings;\n await runRemoveSchemaAction({ settings });\n });\n\n return removeSchemaCommand;\n};\n","import { Command } from \"commander\";\nimport * as p from \"~/cli/prompts.js\";\n\nimport { debugOption } from \"~/globalOptions.js\";\nimport { initProgramState, state } from \"~/state.js\";\nimport { getSettings } from \"~/utils/parseSettings.js\";\nimport { abortIfCancel, ensureProofKitProject } from \"../utils.js\";\nimport { makeRemoveDataSourceCommand, runRemoveDataSourceCommand } from \"./data-source.js\";\nimport { makeRemovePageCommand, runRemovePageAction } from \"./page.js\";\nimport { makeRemoveSchemaCommand, runRemoveSchemaAction } from \"./schema.js\";\n\nexport const runRemove = async (_name: string | undefined) => {\n const settings = getSettings();\n\n const removeType = abortIfCancel(\n await p.select({\n message: \"What do you want to remove from your project?\",\n options: [\n { label: \"Page\", value: \"page\" },\n {\n label: \"Schema\",\n value: \"schema\",\n hint: \"remove a table or layout schema\",\n },\n ...(settings.appType === \"browser\"\n ? [\n {\n label: \"Data Source\",\n value: \"data\",\n hint: \"remove a database or FileMaker connection\",\n },\n ]\n : []),\n ],\n }),\n );\n\n if (removeType === \"data\") {\n await runRemoveDataSourceCommand();\n } else if (removeType === \"page\") {\n await runRemovePageAction();\n } else if (removeType === \"schema\") {\n await runRemoveSchemaAction();\n }\n};\n\nexport function makeRemoveCommand() {\n const removeCommand = new Command(\"remove\")\n .description(\"Remove a component from your project\")\n .argument(\"[name]\", \"Type of component to remove\")\n .addOption(debugOption)\n .action(runRemove);\n\n removeCommand.hook(\"preAction\", (_thisCommand, _actionCommand) => {\n initProgramState(_actionCommand.opts());\n state.baseCommand = \"remove\";\n ensureProofKitProject({ commandName: \"remove\" });\n });\n removeCommand.hook(\"preSubcommand\", (_thisCommand, _subCommand) => {\n initProgramState(_subCommand.opts());\n state.baseCommand = \"remove\";\n ensureProofKitProject({ commandName: \"remove\" });\n });\n\n // Add subcommands\n removeCommand.addCommand(makeRemoveDataSourceCommand());\n removeCommand.addCommand(makeRemovePageCommand());\n removeCommand.addCommand(makeRemoveSchemaCommand());\n\n return removeCommand;\n}\n"],"mappings":"2iBAaA,SAAS,EAAkB,EAAoB,CAC7C,GAAI,EAAO,OAAS,KAClB,OAAO,EAAO,KAGhB,IAAM,EAAU,EAAK,KAAK,EAAM,WAAY,OAAO,CAC/C,EAAG,WAAW,EAAQ,EACxB,EAAO,OAAO,CAAE,KAAM,EAAS,CAAC,CAGlC,IAAM,EAAS,QAAQ,IAAI,EAAO,SAAS,SAAW,iBAChD,EAAW,QAAQ,IAAI,EAAO,SAAS,WAAa,mBAE1D,GAAI,CAIF,MAAO,GAFW,IAAI,IAAI,EAAO,CACC,SACR,GAAG,UACtB,EAAO,CAId,OAHI,EAAM,OACR,QAAQ,MAAM,4BAA6B,EAAM,CAE5C,GAAG,EAAO,GAAG,KAIxB,MAAa,EAA6B,KAAO,IAAkB,CACjE,IAAM,EAAW,GAAa,CAE9B,GAAI,EAAS,YAAY,SAAW,EAAG,CACrC,EAAO,yCAAyC,CAChD,OAGF,IAAI,EAAiB,EAGrB,GAAI,MAGE,CADqB,EAAS,YAAY,KAAM,GAAW,EAAO,OAAS,EAAe,CAE5F,MAAU,MAAM,gBAAgB,EAAe,8BAA8B,MAG/E,EAAiB,EACf,MAAMA,EAAS,CACb,QAAS,2CACT,QAAS,EAAS,YAAY,IAAK,GAAW,CAC5C,IAAI,EAAO,GACX,GAAI,CACF,EAAO,EAAkB,EAAO,OACzB,EAAO,CACV,EAAM,OACR,QAAQ,MAAM,kCAAmC,EAAM,CAEzD,EAAO,qBAET,MAAO,CACL,MAAO,GAAG,EAAO,KAAK,IAAI,EAAK,GAC/B,MAAO,EAAO,KACf,EACD,CACH,CAAC,CACH,CAGH,IAAI,EAAY,GAChB,GAAI,CAAC,GAAsB,GACzB,EAAY,EACV,MAAMC,EAAU,CACd,QAAS,oDAAoD,EAAe,yHAC7E,CAAC,CACH,CAEG,CAAC,GACH,M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