netlify 27.20.1 → 27.21.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.
@@ -1,7 +1,7 @@
1
1
  import { input, select } from '@inquirer/prompts';
2
2
  import { chalk, logAndThrowError, log, logJson } from '../../utils/command-helpers.js';
3
3
  import { startSpinner, stopSpinner } from '../../lib/spinner.js';
4
- import { validatePrompt, validateAgent, formatStatus, getAgentName } from './utils.js';
4
+ import { validatePrompt, validateAgent, formatStatus, getAgentName, resolveAgentAlias } from './utils.js';
5
5
  import { AVAILABLE_AGENTS } from './constants.js';
6
6
  export const agentsCreate = async (promptArg, options, command) => {
7
7
  const { api, site, siteInfo, apiOpts } = command.netlify;
@@ -34,6 +34,7 @@ export const agentsCreate = async (promptArg, options, command) => {
34
34
  });
35
35
  }
36
36
  else {
37
+ agent = resolveAgentAlias(agent);
37
38
  const agentIsValid = validateAgent(agent);
38
39
  if (agentIsValid !== true) {
39
40
  return logAndThrowError(agentIsValid);
@@ -10,7 +10,7 @@ export const createAgentsCommand = (program) => {
10
10
  .argument('[prompt]', 'the prompt for the agent to execute')
11
11
  .description('Create and run a new agent task on your site')
12
12
  .option('-p, --prompt <prompt>', 'agent prompt')
13
- .option('-a, --agent <agent>', 'agent type (claude, codex, gemini)')
13
+ .option('-a, --agent <agent>', 'agent type (claude, codex, antigravity)')
14
14
  .option('-m, --model <model>', 'model to use for the agent')
15
15
  .option('-b, --branch <branch>', 'git branch to work on')
16
16
  .option('--project <project>', 'project ID or name (if not in a linked directory)')
@@ -8,9 +8,13 @@ export declare const AVAILABLE_AGENTS: readonly [{
8
8
  readonly name: 'Codex';
9
9
  readonly value: 'codex';
10
10
  }, {
11
- readonly name: 'Gemini';
12
- readonly value: 'gemini';
11
+ readonly name: 'Antigravity';
12
+ readonly value: 'antigravity';
13
13
  }];
14
+ /**
15
+ * Agent names that are still accepted and mapped to their replacement
16
+ */
17
+ export declare const DEPRECATED_AGENT_ALIASES: Record<string, AvailableAgent>;
14
18
  /**
15
19
  * Valid agent task states
16
20
  */
@@ -5,8 +5,14 @@ import { chalk } from '../../utils/command-helpers.js';
5
5
  export const AVAILABLE_AGENTS = [
6
6
  { name: 'Claude', value: 'claude' },
7
7
  { name: 'Codex', value: 'codex' },
8
- { name: 'Gemini', value: 'gemini' },
8
+ { name: 'Antigravity', value: 'antigravity' },
9
9
  ];
10
+ /**
11
+ * Agent names that are still accepted and mapped to their replacement
12
+ */
13
+ export const DEPRECATED_AGENT_ALIASES = {
14
+ gemini: 'antigravity',
15
+ };
10
16
  /**
11
17
  * Valid agent task states
12
18
  */
@@ -3,6 +3,7 @@ export declare const formatDate: (dateString: string) => string;
3
3
  export declare const formatDuration: (startTime: string, endTime?: string) => string;
4
4
  export declare const formatStatus: (status: string) => string;
5
5
  export declare const validatePrompt: (input: string) => boolean | string;
6
+ export declare const resolveAgentAlias: (agent: string) => string;
6
7
  export declare const validateAgent: (agent: string) => boolean | string;
7
8
  export declare const getAgentName: (agent: string) => string;
8
9
  //# sourceMappingURL=utils.d.ts.map
@@ -1,5 +1,5 @@
1
- import { AVAILABLE_AGENTS, STATUS_COLORS } from './constants.js';
2
- import { chalk } from '../../utils/command-helpers.js';
1
+ import { AVAILABLE_AGENTS, DEPRECATED_AGENT_ALIASES, STATUS_COLORS } from './constants.js';
2
+ import { chalk, warn } from '../../utils/command-helpers.js';
3
3
  export const truncateText = (text, maxLength) => {
4
4
  if (text.length <= maxLength)
5
5
  return text;
@@ -37,6 +37,14 @@ export const validatePrompt = (input) => {
37
37
  }
38
38
  return true;
39
39
  };
40
+ export const resolveAgentAlias = (agent) => {
41
+ if (!Object.hasOwn(DEPRECATED_AGENT_ALIASES, agent)) {
42
+ return agent;
43
+ }
44
+ const replacement = DEPRECATED_AGENT_ALIASES[agent];
45
+ warn(`The "${agent}" agent is deprecated, using "${replacement}" instead.`);
46
+ return replacement;
47
+ };
40
48
  export const validateAgent = (agent) => {
41
49
  const validAgents = AVAILABLE_AGENTS.map((a) => a.value);
42
50
  if (!validAgents.includes(agent)) {
@@ -17,7 +17,7 @@ import { startSpinner, stopSpinner } from '../../lib/spinner.js';
17
17
  import { isInteractive } from '../../utils/scripted-commands.js';
18
18
  import { track } from '../../utils/telemetry/index.js';
19
19
  import { extractZip } from '../../utils/zip.js';
20
- import { validatePrompt, validateAgent, formatStatus } from '../agents/utils.js';
20
+ import { validatePrompt, validateAgent, formatStatus, resolveAgentAlias } from '../agents/utils.js';
21
21
  const execFile = promisify(execFileCb);
22
22
  const resolveGitHubToken = async (globalConfig) => {
23
23
  const userId = globalConfig.get('userId');
@@ -179,7 +179,7 @@ export const createAction = async (promptArg, options, command) => {
179
179
  return logAndThrowError(promptIsValid);
180
180
  }
181
181
  // Resolve agent (default to claude)
182
- const agent = initialAgent ?? 'claude';
182
+ const agent = resolveAgentAlias(initialAgent ?? 'claude');
183
183
  const agentIsValid = validateAgent(agent);
184
184
  if (agentIsValid !== true) {
185
185
  return logAndThrowError(agentIsValid);
@@ -5,7 +5,7 @@ export const createCreateCommand = (program) => {
5
5
  .description('Create a new Netlify project using an AI agent')
6
6
  .argument('[prompt]', 'description of the site to create')
7
7
  .option('-p, --prompt <prompt>', 'description of the site to create')
8
- .option('--agent <agent>', 'agent type (claude, codex, gemini)')
8
+ .option('--agent <agent>', 'agent type (claude, codex, antigravity)')
9
9
  .option('-m, --model <model>', 'model to use for the agent')
10
10
  .option('-n, --name <name>', 'project name (subdomain)', validateSiteName)
11
11
  .option('-d, --dir <path>', 'directory to create the project in (defaults to current directory)')
@@ -2,8 +2,8 @@ import { readFile } from 'fs/promises';
2
2
  import path, { join } from 'path';
3
3
  import { pipeline } from 'stream/promises';
4
4
  import { Readable } from 'stream';
5
- import { SERVER_DIRECTORY } from '@netlify/build';
6
- import { findServerEntry, zipFunctions, zipServer, } from '@netlify/zip-it-and-ship-it';
5
+ import { getServerEntry } from '@netlify/build';
6
+ import { zipFunctions, zipServer, } from '@netlify/zip-it-and-ship-it';
7
7
  import { INTERNAL_FUNCTIONS_FOLDER } from '../functions/functions.js';
8
8
  import { hasherCtor, manifestCollectorCtor } from './hasher-segments.js';
9
9
  // Maximum age of functions manifest (2 minutes).
@@ -65,11 +65,11 @@ const getServerBundle = async ({ packagePath, rootDir, serverConfig, serverManif
65
65
  // rebuilt below.
66
66
  }
67
67
  }
68
- const entryPath = rootDir ? await findServerEntry(join(rootDir, packagePath ?? '', SERVER_DIRECTORY)) : undefined;
69
- if (entryPath === undefined) {
68
+ const serverEntry = rootDir ? await getServerEntry({ buildDir: rootDir, packagePath }) : undefined;
69
+ if (serverEntry === undefined) {
70
70
  return undefined;
71
71
  }
72
- return await zipServer(entryPath, join(tmpDir, 'server'), { basePath: rootDir, config: serverConfig });
72
+ return await zipServer(serverEntry.entryPath, join(tmpDir, 'server'), { basePath: rootDir, config: serverConfig });
73
73
  };
74
74
  const trafficRulesConfig = (trafficRules) => {
75
75
  if (!trafficRules) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "netlify",
3
- "version": "27.20.1",
3
+ "version": "27.21.0",
4
4
  "description": "Netlify command line tool",
5
5
  "keywords": [
6
6
  "api",
@@ -56,11 +56,11 @@
56
56
  "@netlify/ai": "^1.0.2",
57
57
  "@netlify/api": "^15.1.6",
58
58
  "@netlify/blobs": "^11.1.9",
59
- "@netlify/build": "^37.7.6",
59
+ "@netlify/build": "^37.8.0",
60
60
  "@netlify/build-info": "^11.3.1",
61
61
  "@netlify/config": "^25.6.2",
62
62
  "@netlify/dev": "^5.1.16",
63
- "@netlify/dev-utils": "^6.1.0",
63
+ "@netlify/dev-utils": "^6.1.1",
64
64
  "@netlify/edge-bundler": "^16.2.0",
65
65
  "@netlify/edge-functions": "^4.0.3",
66
66
  "@netlify/edge-functions-bootstrap": "^3.2.0",
@@ -69,7 +69,7 @@
69
69
  "@netlify/local-functions-proxy": "^2.0.3",
70
70
  "@netlify/redirect-matcher": "^0.7.0",
71
71
  "@netlify/redirect-parser": "^16.1.1",
72
- "@netlify/server-dev": "^0.1.5",
72
+ "@netlify/server-dev": "^0.1.10",
73
73
  "@netlify/zip-it-and-ship-it": "^16.6.0",
74
74
  "@opentelemetry/api": "~1.9.0",
75
75
  "@pnpm/tabtab": "^0.5.4",