@stackable-labs/cli-app-extension 1.83.0 → 1.84.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +4 -22
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -3117,6 +3117,7 @@ var DevApp = ({ token, userId, orgId, options = {} }) => {
3117
3117
  return /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(Text, { children: "Loading..." }) });
3118
3118
  };
3119
3119
  var DEFAULT_STATIC_CDN_URL = "https://static.stackablelabs.io";
3120
+ var MCP_FILE_PATTERN = /mcp\.json$|\.gemini\/settings\.json$|\.codex\/config\.toml$/;
3120
3121
  var AI_DOCS_FILENAME = "extension-ai-docs.zip";
3121
3122
  var getStaticCdnBaseUrl = () => process.env.STATIC_CDN_BASE_URL ?? DEFAULT_STATIC_CDN_URL;
3122
3123
  var isValidManifest = (data) => {
@@ -3142,7 +3143,7 @@ var isExtensionProject = (dir) => {
3142
3143
  }
3143
3144
  return { valid: true };
3144
3145
  };
3145
- var downloadAndExtractAiDocs = async (targetDir, version2) => {
3146
+ var downloadAndExtractAiDocs = async (targetDir, version2, filter) => {
3146
3147
  const baseUrl = getStaticCdnBaseUrl();
3147
3148
  const zipUrl = `${baseUrl}/ai-docs/${version2}/${AI_DOCS_FILENAME}`;
3148
3149
  const response = await fetch(zipUrl);
@@ -3157,27 +3158,7 @@ var downloadAndExtractAiDocs = async (targetDir, version2) => {
3157
3158
  if (entry.isDirectory) {
3158
3159
  continue;
3159
3160
  }
3160
- const targetPath = join(targetDir, entry.entryName);
3161
- await mkdir(dirname(targetPath), { recursive: true });
3162
- await writeFile(targetPath, entry.getData());
3163
- extractedFiles.push(entry.entryName);
3164
- }
3165
- return { files: extractedFiles.sort() };
3166
- };
3167
- var MCP_FILE_PATTERN = /mcp\.json$/;
3168
- var downloadAndExtractMcpConfig = async (targetDir, version2) => {
3169
- const baseUrl = getStaticCdnBaseUrl();
3170
- const zipUrl = `${baseUrl}/ai-docs/${version2}/${AI_DOCS_FILENAME}`;
3171
- const response = await fetch(zipUrl);
3172
- if (!response.ok) {
3173
- throw new Error(`Failed to download AI docs from ${zipUrl}: ${response.status} ${response.statusText}`);
3174
- }
3175
- const buffer = Buffer.from(await response.arrayBuffer());
3176
- const zip = new AdmZip(buffer);
3177
- const entries = zip.getEntries();
3178
- const extractedFiles = [];
3179
- for (const entry of entries) {
3180
- if (entry.isDirectory || !MCP_FILE_PATTERN.test(entry.entryName)) {
3161
+ if (filter && !filter(entry.entryName)) {
3181
3162
  continue;
3182
3163
  }
3183
3164
  const targetPath = join(targetDir, entry.entryName);
@@ -3187,6 +3168,7 @@ var downloadAndExtractMcpConfig = async (targetDir, version2) => {
3187
3168
  }
3188
3169
  return { files: extractedFiles.sort() };
3189
3170
  };
3171
+ var downloadAndExtractMcpConfig = async (targetDir, version2) => downloadAndExtractAiDocs(targetDir, version2, (name) => MCP_FILE_PATTERN.test(name));
3190
3172
  var AIScaffold = ({ version: version2 }) => {
3191
3173
  const { exit } = useApp();
3192
3174
  const [state, setState] = useState("validating");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stackable-labs/cli-app-extension",
3
- "version": "1.83.0",
3
+ "version": "1.84.0",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "bin": {