@wix/create-new 0.0.107 → 0.0.108
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/build/{chunk-H4ZDAFAO.js → chunk-JNEPCJPC.js} +1 -1
- package/build/{chunk-H4ZDAFAO.js.map → chunk-JNEPCJPC.js.map} +1 -1
- package/build/{generator-7VK2WAO7.js → generator-244YLYSZ.js} +2 -2
- package/build/index.js +294 -92
- package/build/index.js.map +1 -1
- package/package.json +4 -4
- /package/build/{generator-7VK2WAO7.js.map → generator-244YLYSZ.js.map} +0 -0
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
require_lib,
|
|
14
14
|
temporaryDirectory,
|
|
15
15
|
updateEnvFile
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-JNEPCJPC.js";
|
|
17
17
|
import {
|
|
18
18
|
__toESM,
|
|
19
19
|
init_esm_shims
|
|
@@ -115,4 +115,4 @@ async function generateApp({
|
|
|
115
115
|
export {
|
|
116
116
|
generateApp
|
|
117
117
|
};
|
|
118
|
-
//# sourceMappingURL=generator-
|
|
118
|
+
//# sourceMappingURL=generator-244YLYSZ.js.map
|
package/build/index.js
CHANGED
|
@@ -119,7 +119,7 @@ import {
|
|
|
119
119
|
writeJson,
|
|
120
120
|
writePackageJson,
|
|
121
121
|
zod_default
|
|
122
|
-
} from "./chunk-
|
|
122
|
+
} from "./chunk-JNEPCJPC.js";
|
|
123
123
|
import {
|
|
124
124
|
__commonJS,
|
|
125
125
|
__dirname,
|
|
@@ -47902,9 +47902,9 @@ var require_startCase = __commonJS({
|
|
|
47902
47902
|
}
|
|
47903
47903
|
});
|
|
47904
47904
|
|
|
47905
|
-
// ../../node_modules
|
|
47905
|
+
// ../../node_modules/detect-agent/dist/index.js
|
|
47906
47906
|
var require_dist4 = __commonJS({
|
|
47907
|
-
"../../node_modules
|
|
47907
|
+
"../../node_modules/detect-agent/dist/index.js"(exports, module2) {
|
|
47908
47908
|
"use strict";
|
|
47909
47909
|
init_esm_shims();
|
|
47910
47910
|
var __defProp2 = Object.defineProperty;
|
|
@@ -47924,103 +47924,305 @@ var require_dist4 = __commonJS({
|
|
|
47924
47924
|
return to;
|
|
47925
47925
|
};
|
|
47926
47926
|
var __toCommonJS2 = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
|
|
47927
|
-
var
|
|
47928
|
-
__export2(
|
|
47927
|
+
var index_exports = {};
|
|
47928
|
+
__export2(index_exports, {
|
|
47929
47929
|
KNOWN_AGENTS: () => KNOWN_AGENTS,
|
|
47930
47930
|
determineAgent: () => determineAgent2
|
|
47931
47931
|
});
|
|
47932
|
-
module2.exports = __toCommonJS2(
|
|
47933
|
-
var
|
|
47934
|
-
|
|
47935
|
-
|
|
47936
|
-
|
|
47937
|
-
|
|
47938
|
-
|
|
47939
|
-
|
|
47940
|
-
|
|
47941
|
-
|
|
47942
|
-
|
|
47943
|
-
|
|
47944
|
-
|
|
47945
|
-
|
|
47946
|
-
|
|
47947
|
-
|
|
47948
|
-
|
|
47949
|
-
|
|
47950
|
-
|
|
47951
|
-
|
|
47952
|
-
|
|
47953
|
-
|
|
47954
|
-
|
|
47955
|
-
|
|
47956
|
-
|
|
47957
|
-
|
|
47958
|
-
|
|
47959
|
-
|
|
47960
|
-
|
|
47961
|
-
|
|
47962
|
-
|
|
47963
|
-
|
|
47932
|
+
module2.exports = __toCommonJS2(index_exports);
|
|
47933
|
+
var agents_default = {
|
|
47934
|
+
$schema: "./agents.schema.json",
|
|
47935
|
+
version: 1,
|
|
47936
|
+
description: "Language-agnostic specification for detecting AI agents and automated development environments. Agents are evaluated in array order; the first agent whose `match` condition is satisfied wins. Every agent's `match` is a combinator (`anyOf`/`allOf`) whose `conditions` are evaluated as a tree: combinators nest, and `env_set`/`env_value`/`file_exists` are leaf checks. See agents.schema.json for the full structure.",
|
|
47937
|
+
aiAgentVar: "AI_AGENT",
|
|
47938
|
+
agents: [
|
|
47939
|
+
{
|
|
47940
|
+
key: "CURSOR",
|
|
47941
|
+
name: "cursor",
|
|
47942
|
+
match: {
|
|
47943
|
+
type: "anyOf",
|
|
47944
|
+
conditions: [{ type: "env_set", name: "CURSOR_TRACE_ID" }]
|
|
47945
|
+
}
|
|
47946
|
+
},
|
|
47947
|
+
{
|
|
47948
|
+
key: "CURSOR_CLI",
|
|
47949
|
+
name: "cursor-cli",
|
|
47950
|
+
match: {
|
|
47951
|
+
type: "anyOf",
|
|
47952
|
+
conditions: [
|
|
47953
|
+
{ type: "env_set", name: "CURSOR_AGENT" },
|
|
47954
|
+
{
|
|
47955
|
+
type: "env_value",
|
|
47956
|
+
name: "CURSOR_EXTENSION_HOST_ROLE",
|
|
47957
|
+
value: "agent-exec"
|
|
47958
|
+
}
|
|
47959
|
+
]
|
|
47960
|
+
}
|
|
47961
|
+
},
|
|
47962
|
+
{
|
|
47963
|
+
key: "KIMI",
|
|
47964
|
+
name: "kimi",
|
|
47965
|
+
description: "Kimi Code plugin hooks. KIMI_CODE_HOME may be configured outside an active Kimi session, so detection uses the plugin-scoped KIMI_PLUGIN_ROOT marker.",
|
|
47966
|
+
match: {
|
|
47967
|
+
type: "anyOf",
|
|
47968
|
+
conditions: [{ type: "env_set", name: "KIMI_PLUGIN_ROOT" }]
|
|
47969
|
+
}
|
|
47970
|
+
},
|
|
47971
|
+
{
|
|
47972
|
+
key: "GROK",
|
|
47973
|
+
name: "grok",
|
|
47974
|
+
description: "Grok Build plugin hooks. Evaluated before Claude Code because Grok supports Claude Code plugins and may expose compatibility markers.",
|
|
47975
|
+
match: {
|
|
47976
|
+
type: "anyOf",
|
|
47977
|
+
conditions: [
|
|
47978
|
+
{ type: "env_set", name: "GROK_PLUGIN_ROOT" },
|
|
47979
|
+
{ type: "env_set", name: "GROK_PLUGIN_DATA" }
|
|
47980
|
+
]
|
|
47981
|
+
}
|
|
47982
|
+
},
|
|
47983
|
+
{
|
|
47984
|
+
key: "GEMINI",
|
|
47985
|
+
name: "gemini_cli",
|
|
47986
|
+
match: {
|
|
47987
|
+
type: "anyOf",
|
|
47988
|
+
conditions: [{ type: "env_set", name: "GEMINI_CLI" }]
|
|
47989
|
+
}
|
|
47990
|
+
},
|
|
47991
|
+
{
|
|
47992
|
+
key: "CLINE",
|
|
47993
|
+
name: "cline",
|
|
47994
|
+
match: {
|
|
47995
|
+
type: "anyOf",
|
|
47996
|
+
conditions: [{ type: "env_set", name: "CLINE_ACTIVE" }]
|
|
47997
|
+
}
|
|
47998
|
+
},
|
|
47999
|
+
{
|
|
48000
|
+
key: "CODEX",
|
|
48001
|
+
name: "codex_cli",
|
|
48002
|
+
match: {
|
|
48003
|
+
type: "anyOf",
|
|
48004
|
+
conditions: [
|
|
48005
|
+
{ type: "env_set", name: "CODEX_SANDBOX" },
|
|
48006
|
+
{ type: "env_set", name: "CODEX_CI" },
|
|
48007
|
+
{ type: "env_set", name: "CODEX_THREAD_ID" },
|
|
48008
|
+
{ type: "env_set", name: "CODEX_SANDBOX_NETWORK_DISABLED" }
|
|
48009
|
+
]
|
|
48010
|
+
}
|
|
48011
|
+
},
|
|
48012
|
+
{
|
|
48013
|
+
key: "ANTIGRAVITY",
|
|
48014
|
+
name: "antigravity",
|
|
48015
|
+
match: {
|
|
48016
|
+
type: "anyOf",
|
|
48017
|
+
conditions: [
|
|
48018
|
+
{ type: "env_set", name: "ANTIGRAVITY_AGENT" },
|
|
48019
|
+
{ type: "env_set", name: "ANTIGRAVITY_CLI_ALIAS" }
|
|
48020
|
+
]
|
|
48021
|
+
}
|
|
48022
|
+
},
|
|
48023
|
+
{
|
|
48024
|
+
key: "AUGMENT_CLI",
|
|
48025
|
+
name: "augment-cli",
|
|
48026
|
+
match: {
|
|
48027
|
+
type: "anyOf",
|
|
48028
|
+
conditions: [{ type: "env_set", name: "AUGMENT_AGENT" }]
|
|
48029
|
+
}
|
|
48030
|
+
},
|
|
48031
|
+
{
|
|
48032
|
+
key: "OPENCODE",
|
|
48033
|
+
name: "open_code",
|
|
48034
|
+
match: {
|
|
48035
|
+
type: "anyOf",
|
|
48036
|
+
conditions: [
|
|
48037
|
+
{ type: "env_set", name: "OPENCODE_CLIENT" },
|
|
48038
|
+
{ type: "env_set", name: "OPENCODE" }
|
|
48039
|
+
]
|
|
48040
|
+
}
|
|
48041
|
+
},
|
|
48042
|
+
{
|
|
48043
|
+
key: "GOOSE",
|
|
48044
|
+
name: "goose",
|
|
48045
|
+
match: {
|
|
48046
|
+
type: "anyOf",
|
|
48047
|
+
conditions: [{ type: "env_set", name: "GOOSE_PROVIDER" }]
|
|
48048
|
+
}
|
|
48049
|
+
},
|
|
48050
|
+
{
|
|
48051
|
+
key: "JUNIE",
|
|
48052
|
+
name: "junie",
|
|
48053
|
+
match: {
|
|
48054
|
+
type: "anyOf",
|
|
48055
|
+
conditions: [
|
|
48056
|
+
{ type: "env_set", name: "JUNIE_DATA" },
|
|
48057
|
+
{ type: "env_set", name: "JUNIE_SHIM_PATH" }
|
|
48058
|
+
]
|
|
48059
|
+
}
|
|
48060
|
+
},
|
|
48061
|
+
{
|
|
48062
|
+
key: "PI",
|
|
48063
|
+
name: "pi",
|
|
48064
|
+
description: "Matches when the PATH contains a '.pi/agent' (or '.pi\\\\agent') segment.",
|
|
48065
|
+
match: {
|
|
48066
|
+
type: "anyOf",
|
|
48067
|
+
conditions: [
|
|
48068
|
+
{
|
|
48069
|
+
type: "env_matches",
|
|
48070
|
+
name: "PATH",
|
|
48071
|
+
pattern: "\\.pi[\\\\/]agent"
|
|
48072
|
+
}
|
|
48073
|
+
]
|
|
48074
|
+
}
|
|
48075
|
+
},
|
|
48076
|
+
{
|
|
48077
|
+
key: "COWORK",
|
|
48078
|
+
name: "cowork",
|
|
48079
|
+
description: "Claude Cowork. Evaluated before `claude_code` so the more specific COWORK marker wins. Requires CLAUDE_CODE_IS_COWORK plus a Claude Code marker.",
|
|
48080
|
+
match: {
|
|
48081
|
+
type: "allOf",
|
|
48082
|
+
conditions: [
|
|
48083
|
+
{ type: "env_set", name: "CLAUDE_CODE_IS_COWORK" },
|
|
48084
|
+
{
|
|
48085
|
+
type: "anyOf",
|
|
48086
|
+
conditions: [
|
|
48087
|
+
{ type: "env_set", name: "CLAUDECODE" },
|
|
48088
|
+
{ type: "env_set", name: "CLAUDE_CODE" }
|
|
48089
|
+
]
|
|
48090
|
+
}
|
|
48091
|
+
]
|
|
48092
|
+
}
|
|
48093
|
+
},
|
|
48094
|
+
{
|
|
48095
|
+
key: "CLAUDE",
|
|
48096
|
+
name: "claude_code",
|
|
48097
|
+
match: {
|
|
48098
|
+
type: "anyOf",
|
|
48099
|
+
conditions: [
|
|
48100
|
+
{ type: "env_set", name: "CLAUDECODE" },
|
|
48101
|
+
{ type: "env_set", name: "CLAUDE_CODE" }
|
|
48102
|
+
]
|
|
48103
|
+
}
|
|
48104
|
+
},
|
|
48105
|
+
{
|
|
48106
|
+
key: "REPLIT",
|
|
48107
|
+
name: "replit",
|
|
48108
|
+
match: {
|
|
48109
|
+
type: "anyOf",
|
|
48110
|
+
conditions: [{ type: "env_set", name: "REPL_ID" }]
|
|
48111
|
+
}
|
|
48112
|
+
},
|
|
48113
|
+
{
|
|
48114
|
+
key: "GITHUB_COPILOT",
|
|
48115
|
+
name: "github-copilot",
|
|
48116
|
+
match: {
|
|
48117
|
+
type: "anyOf",
|
|
48118
|
+
conditions: [
|
|
48119
|
+
{ type: "env_set", name: "COPILOT_MODEL" },
|
|
48120
|
+
{ type: "env_set", name: "COPILOT_ALLOW_ALL" },
|
|
48121
|
+
{ type: "env_set", name: "COPILOT_GITHUB_TOKEN" }
|
|
48122
|
+
]
|
|
48123
|
+
}
|
|
48124
|
+
},
|
|
48125
|
+
{
|
|
48126
|
+
key: "KIRO",
|
|
48127
|
+
name: "kiro",
|
|
48128
|
+
description: "AWS Kiro. TERM_PROGRAM=kiro is set by both the IDE terminal and the CLI agent, so gate on no_tty to avoid misdetecting a human at the integrated terminal.",
|
|
48129
|
+
match: {
|
|
48130
|
+
type: "allOf",
|
|
48131
|
+
conditions: [
|
|
48132
|
+
{ type: "env_matches", name: "TERM_PROGRAM", pattern: "kiro" },
|
|
48133
|
+
{ type: "no_tty" }
|
|
48134
|
+
]
|
|
48135
|
+
}
|
|
48136
|
+
},
|
|
48137
|
+
{
|
|
48138
|
+
key: "OPENCLAW",
|
|
48139
|
+
name: "openclaw",
|
|
48140
|
+
match: {
|
|
48141
|
+
type: "anyOf",
|
|
48142
|
+
conditions: [{ type: "env_set", name: "OPENCLAW_SHELL" }]
|
|
48143
|
+
}
|
|
48144
|
+
},
|
|
48145
|
+
{
|
|
48146
|
+
key: "DEVIN",
|
|
48147
|
+
name: "devin",
|
|
48148
|
+
match: {
|
|
48149
|
+
type: "anyOf",
|
|
48150
|
+
conditions: [{ type: "file_exists", path: "/opt/.devin" }]
|
|
48151
|
+
}
|
|
48152
|
+
}
|
|
48153
|
+
]
|
|
47964
48154
|
};
|
|
47965
|
-
|
|
47966
|
-
|
|
47967
|
-
|
|
47968
|
-
|
|
47969
|
-
|
|
47970
|
-
|
|
47971
|
-
|
|
47972
|
-
|
|
47973
|
-
|
|
48155
|
+
var import_promises7 = __require("fs/promises");
|
|
48156
|
+
var import_node_fs10 = __require("fs");
|
|
48157
|
+
async function evaluateCondition(condition) {
|
|
48158
|
+
switch (condition.type) {
|
|
48159
|
+
case "env_set":
|
|
48160
|
+
return Boolean(process.env[condition.name]);
|
|
48161
|
+
case "env_value":
|
|
48162
|
+
return process.env[condition.name] === condition.value;
|
|
48163
|
+
case "env_matches": {
|
|
48164
|
+
const value2 = process.env[condition.name];
|
|
48165
|
+
if (!value2) {
|
|
48166
|
+
return false;
|
|
47974
48167
|
}
|
|
47975
|
-
|
|
47976
|
-
return
|
|
47977
|
-
|
|
47978
|
-
|
|
47979
|
-
};
|
|
48168
|
+
try {
|
|
48169
|
+
return new RegExp(condition.pattern).test(value2);
|
|
48170
|
+
} catch {
|
|
48171
|
+
return false;
|
|
47980
48172
|
}
|
|
47981
|
-
return {
|
|
47982
|
-
isAgent: true,
|
|
47983
|
-
agent: { name }
|
|
47984
|
-
};
|
|
47985
48173
|
}
|
|
48174
|
+
case "no_tty":
|
|
48175
|
+
return !process.stdout?.isTTY;
|
|
48176
|
+
case "file_exists":
|
|
48177
|
+
try {
|
|
48178
|
+
await (0, import_promises7.access)(condition.path, import_node_fs10.constants.F_OK);
|
|
48179
|
+
return true;
|
|
48180
|
+
} catch {
|
|
48181
|
+
return false;
|
|
48182
|
+
}
|
|
48183
|
+
case "anyOf":
|
|
48184
|
+
for (const sub of condition.conditions) {
|
|
48185
|
+
if (await evaluateCondition(sub)) {
|
|
48186
|
+
return true;
|
|
48187
|
+
}
|
|
48188
|
+
}
|
|
48189
|
+
return false;
|
|
48190
|
+
case "allOf":
|
|
48191
|
+
for (const sub of condition.conditions) {
|
|
48192
|
+
if (!await evaluateCondition(sub)) {
|
|
48193
|
+
return false;
|
|
48194
|
+
}
|
|
48195
|
+
}
|
|
48196
|
+
return true;
|
|
48197
|
+
default:
|
|
48198
|
+
return false;
|
|
47986
48199
|
}
|
|
47987
|
-
|
|
47988
|
-
|
|
47989
|
-
}
|
|
47990
|
-
|
|
47991
|
-
|
|
47992
|
-
|
|
47993
|
-
|
|
47994
|
-
|
|
47995
|
-
|
|
47996
|
-
|
|
47997
|
-
return { isAgent: true, agent: { name: CODEX } };
|
|
47998
|
-
}
|
|
47999
|
-
if (process.env.ANTIGRAVITY_AGENT) {
|
|
48000
|
-
return { isAgent: true, agent: { name: ANTIGRAVITY } };
|
|
48200
|
+
}
|
|
48201
|
+
var KNOWN_AGENTS = Object.fromEntries(
|
|
48202
|
+
agents_default.agents.map(({ key, name }) => [key, name])
|
|
48203
|
+
);
|
|
48204
|
+
var agents = agents_default.agents;
|
|
48205
|
+
var aiAgentVar = agents_default.aiAgentVar;
|
|
48206
|
+
function resolveAiAgentStandard() {
|
|
48207
|
+
const raw = process.env[aiAgentVar];
|
|
48208
|
+
if (!raw) {
|
|
48209
|
+
return void 0;
|
|
48001
48210
|
}
|
|
48002
|
-
|
|
48003
|
-
|
|
48211
|
+
const value2 = raw.trim();
|
|
48212
|
+
if (!value2) {
|
|
48213
|
+
return void 0;
|
|
48004
48214
|
}
|
|
48005
|
-
|
|
48006
|
-
|
|
48215
|
+
return value2;
|
|
48216
|
+
}
|
|
48217
|
+
async function determineAgent2() {
|
|
48218
|
+
const aiAgentStandard = resolveAiAgentStandard();
|
|
48219
|
+
if (aiAgentStandard) {
|
|
48220
|
+
return { isAgent: true, agent: { name: aiAgentStandard } };
|
|
48007
48221
|
}
|
|
48008
|
-
|
|
48009
|
-
if (
|
|
48010
|
-
return { isAgent: true, agent: { name:
|
|
48222
|
+
for (const agent of agents) {
|
|
48223
|
+
if (await evaluateCondition(agent.match)) {
|
|
48224
|
+
return { isAgent: true, agent: { name: agent.name } };
|
|
48011
48225
|
}
|
|
48012
|
-
return { isAgent: true, agent: { name: CLAUDE } };
|
|
48013
|
-
}
|
|
48014
|
-
if (process.env.REPL_ID) {
|
|
48015
|
-
return { isAgent: true, agent: { name: REPLIT } };
|
|
48016
|
-
}
|
|
48017
|
-
if (process.env.COPILOT_MODEL || process.env.COPILOT_ALLOW_ALL || process.env.COPILOT_GITHUB_TOKEN) {
|
|
48018
|
-
return { isAgent: true, agent: { name: GITHUB_COPILOT } };
|
|
48019
|
-
}
|
|
48020
|
-
try {
|
|
48021
|
-
await (0, import_promises7.access)(DEVIN_LOCAL_PATH, import_node_fs10.constants.F_OK);
|
|
48022
|
-
return { isAgent: true, agent: { name: DEVIN } };
|
|
48023
|
-
} catch (_error) {
|
|
48024
48226
|
}
|
|
48025
48227
|
return { isAgent: false, agent: void 0 };
|
|
48026
48228
|
}
|
|
@@ -82994,7 +83196,7 @@ function getTasks({
|
|
|
82994
83196
|
cause: e2
|
|
82995
83197
|
});
|
|
82996
83198
|
}
|
|
82997
|
-
const { generateApp } = await import("./generator-
|
|
83199
|
+
const { generateApp } = await import("./generator-244YLYSZ.js");
|
|
82998
83200
|
await generateApp({
|
|
82999
83201
|
packageName,
|
|
83000
83202
|
packageFolder,
|
|
@@ -95354,11 +95556,10 @@ import { randomUUID as randomUUID3 } from "node:crypto";
|
|
|
95354
95556
|
var package_default = {
|
|
95355
95557
|
name: "@wix/create-new",
|
|
95356
95558
|
description: "General entry point for creating Wix projects",
|
|
95357
|
-
version: "0.0.
|
|
95559
|
+
version: "0.0.108",
|
|
95358
95560
|
bin: "bin/index.cjs",
|
|
95359
95561
|
devDependencies: {
|
|
95360
95562
|
"@commander-js/extra-typings": "^13.0.0",
|
|
95361
|
-
"@vercel/detect-agent": "^1.2.3",
|
|
95362
95563
|
"@wix/app-command": "workspace:*",
|
|
95363
95564
|
"@wix/cli-auth": "workspace:*",
|
|
95364
95565
|
"@wix/cli-error-reporting": "workspace:*",
|
|
@@ -95367,7 +95568,8 @@ var package_default = {
|
|
|
95367
95568
|
"@wix/create-app-definitions": "workspace:*",
|
|
95368
95569
|
"@wix/headless-command": "workspace:*",
|
|
95369
95570
|
"@wix/package-manager": "workspace:*",
|
|
95370
|
-
"@wix/tsup-configs": "workspace:*"
|
|
95571
|
+
"@wix/tsup-configs": "workspace:*",
|
|
95572
|
+
"detect-agent": "^1.2.0"
|
|
95371
95573
|
},
|
|
95372
95574
|
engines: {
|
|
95373
95575
|
node: ">= 20.11.0"
|