@wix/create-app 0.0.246 → 0.0.248
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/index.js
CHANGED
|
@@ -31053,9 +31053,9 @@ var require_kebabCase = __commonJS({
|
|
|
31053
31053
|
}
|
|
31054
31054
|
});
|
|
31055
31055
|
|
|
31056
|
-
// ../../node_modules
|
|
31056
|
+
// ../../node_modules/detect-agent/dist/index.js
|
|
31057
31057
|
var require_dist4 = __commonJS({
|
|
31058
|
-
"../../node_modules
|
|
31058
|
+
"../../node_modules/detect-agent/dist/index.js"(exports, module2) {
|
|
31059
31059
|
"use strict";
|
|
31060
31060
|
init_esm_shims();
|
|
31061
31061
|
var __defProp = Object.defineProperty;
|
|
@@ -31075,103 +31075,305 @@ var require_dist4 = __commonJS({
|
|
|
31075
31075
|
return to;
|
|
31076
31076
|
};
|
|
31077
31077
|
var __toCommonJS2 = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
31078
|
-
var
|
|
31079
|
-
__export2(
|
|
31078
|
+
var index_exports = {};
|
|
31079
|
+
__export2(index_exports, {
|
|
31080
31080
|
KNOWN_AGENTS: () => KNOWN_AGENTS,
|
|
31081
31081
|
determineAgent: () => determineAgent2
|
|
31082
31082
|
});
|
|
31083
|
-
module2.exports = __toCommonJS2(
|
|
31084
|
-
var
|
|
31085
|
-
|
|
31086
|
-
|
|
31087
|
-
|
|
31088
|
-
|
|
31089
|
-
|
|
31090
|
-
|
|
31091
|
-
|
|
31092
|
-
|
|
31093
|
-
|
|
31094
|
-
|
|
31095
|
-
|
|
31096
|
-
|
|
31097
|
-
|
|
31098
|
-
|
|
31099
|
-
|
|
31100
|
-
|
|
31101
|
-
|
|
31102
|
-
|
|
31103
|
-
|
|
31104
|
-
|
|
31105
|
-
|
|
31106
|
-
|
|
31107
|
-
|
|
31108
|
-
|
|
31109
|
-
|
|
31110
|
-
|
|
31111
|
-
|
|
31112
|
-
|
|
31113
|
-
|
|
31114
|
-
|
|
31083
|
+
module2.exports = __toCommonJS2(index_exports);
|
|
31084
|
+
var agents_default = {
|
|
31085
|
+
$schema: "./agents.schema.json",
|
|
31086
|
+
version: 1,
|
|
31087
|
+
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.",
|
|
31088
|
+
aiAgentVar: "AI_AGENT",
|
|
31089
|
+
agents: [
|
|
31090
|
+
{
|
|
31091
|
+
key: "CURSOR",
|
|
31092
|
+
name: "cursor",
|
|
31093
|
+
match: {
|
|
31094
|
+
type: "anyOf",
|
|
31095
|
+
conditions: [{ type: "env_set", name: "CURSOR_TRACE_ID" }]
|
|
31096
|
+
}
|
|
31097
|
+
},
|
|
31098
|
+
{
|
|
31099
|
+
key: "CURSOR_CLI",
|
|
31100
|
+
name: "cursor-cli",
|
|
31101
|
+
match: {
|
|
31102
|
+
type: "anyOf",
|
|
31103
|
+
conditions: [
|
|
31104
|
+
{ type: "env_set", name: "CURSOR_AGENT" },
|
|
31105
|
+
{
|
|
31106
|
+
type: "env_value",
|
|
31107
|
+
name: "CURSOR_EXTENSION_HOST_ROLE",
|
|
31108
|
+
value: "agent-exec"
|
|
31109
|
+
}
|
|
31110
|
+
]
|
|
31111
|
+
}
|
|
31112
|
+
},
|
|
31113
|
+
{
|
|
31114
|
+
key: "KIMI",
|
|
31115
|
+
name: "kimi",
|
|
31116
|
+
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.",
|
|
31117
|
+
match: {
|
|
31118
|
+
type: "anyOf",
|
|
31119
|
+
conditions: [{ type: "env_set", name: "KIMI_PLUGIN_ROOT" }]
|
|
31120
|
+
}
|
|
31121
|
+
},
|
|
31122
|
+
{
|
|
31123
|
+
key: "GROK",
|
|
31124
|
+
name: "grok",
|
|
31125
|
+
description: "Grok Build plugin hooks. Evaluated before Claude Code because Grok supports Claude Code plugins and may expose compatibility markers.",
|
|
31126
|
+
match: {
|
|
31127
|
+
type: "anyOf",
|
|
31128
|
+
conditions: [
|
|
31129
|
+
{ type: "env_set", name: "GROK_PLUGIN_ROOT" },
|
|
31130
|
+
{ type: "env_set", name: "GROK_PLUGIN_DATA" }
|
|
31131
|
+
]
|
|
31132
|
+
}
|
|
31133
|
+
},
|
|
31134
|
+
{
|
|
31135
|
+
key: "GEMINI",
|
|
31136
|
+
name: "gemini_cli",
|
|
31137
|
+
match: {
|
|
31138
|
+
type: "anyOf",
|
|
31139
|
+
conditions: [{ type: "env_set", name: "GEMINI_CLI" }]
|
|
31140
|
+
}
|
|
31141
|
+
},
|
|
31142
|
+
{
|
|
31143
|
+
key: "CLINE",
|
|
31144
|
+
name: "cline",
|
|
31145
|
+
match: {
|
|
31146
|
+
type: "anyOf",
|
|
31147
|
+
conditions: [{ type: "env_set", name: "CLINE_ACTIVE" }]
|
|
31148
|
+
}
|
|
31149
|
+
},
|
|
31150
|
+
{
|
|
31151
|
+
key: "CODEX",
|
|
31152
|
+
name: "codex_cli",
|
|
31153
|
+
match: {
|
|
31154
|
+
type: "anyOf",
|
|
31155
|
+
conditions: [
|
|
31156
|
+
{ type: "env_set", name: "CODEX_SANDBOX" },
|
|
31157
|
+
{ type: "env_set", name: "CODEX_CI" },
|
|
31158
|
+
{ type: "env_set", name: "CODEX_THREAD_ID" },
|
|
31159
|
+
{ type: "env_set", name: "CODEX_SANDBOX_NETWORK_DISABLED" }
|
|
31160
|
+
]
|
|
31161
|
+
}
|
|
31162
|
+
},
|
|
31163
|
+
{
|
|
31164
|
+
key: "ANTIGRAVITY",
|
|
31165
|
+
name: "antigravity",
|
|
31166
|
+
match: {
|
|
31167
|
+
type: "anyOf",
|
|
31168
|
+
conditions: [
|
|
31169
|
+
{ type: "env_set", name: "ANTIGRAVITY_AGENT" },
|
|
31170
|
+
{ type: "env_set", name: "ANTIGRAVITY_CLI_ALIAS" }
|
|
31171
|
+
]
|
|
31172
|
+
}
|
|
31173
|
+
},
|
|
31174
|
+
{
|
|
31175
|
+
key: "AUGMENT_CLI",
|
|
31176
|
+
name: "augment-cli",
|
|
31177
|
+
match: {
|
|
31178
|
+
type: "anyOf",
|
|
31179
|
+
conditions: [{ type: "env_set", name: "AUGMENT_AGENT" }]
|
|
31180
|
+
}
|
|
31181
|
+
},
|
|
31182
|
+
{
|
|
31183
|
+
key: "OPENCODE",
|
|
31184
|
+
name: "open_code",
|
|
31185
|
+
match: {
|
|
31186
|
+
type: "anyOf",
|
|
31187
|
+
conditions: [
|
|
31188
|
+
{ type: "env_set", name: "OPENCODE_CLIENT" },
|
|
31189
|
+
{ type: "env_set", name: "OPENCODE" }
|
|
31190
|
+
]
|
|
31191
|
+
}
|
|
31192
|
+
},
|
|
31193
|
+
{
|
|
31194
|
+
key: "GOOSE",
|
|
31195
|
+
name: "goose",
|
|
31196
|
+
match: {
|
|
31197
|
+
type: "anyOf",
|
|
31198
|
+
conditions: [{ type: "env_set", name: "GOOSE_PROVIDER" }]
|
|
31199
|
+
}
|
|
31200
|
+
},
|
|
31201
|
+
{
|
|
31202
|
+
key: "JUNIE",
|
|
31203
|
+
name: "junie",
|
|
31204
|
+
match: {
|
|
31205
|
+
type: "anyOf",
|
|
31206
|
+
conditions: [
|
|
31207
|
+
{ type: "env_set", name: "JUNIE_DATA" },
|
|
31208
|
+
{ type: "env_set", name: "JUNIE_SHIM_PATH" }
|
|
31209
|
+
]
|
|
31210
|
+
}
|
|
31211
|
+
},
|
|
31212
|
+
{
|
|
31213
|
+
key: "PI",
|
|
31214
|
+
name: "pi",
|
|
31215
|
+
description: "Matches when the PATH contains a '.pi/agent' (or '.pi\\\\agent') segment.",
|
|
31216
|
+
match: {
|
|
31217
|
+
type: "anyOf",
|
|
31218
|
+
conditions: [
|
|
31219
|
+
{
|
|
31220
|
+
type: "env_matches",
|
|
31221
|
+
name: "PATH",
|
|
31222
|
+
pattern: "\\.pi[\\\\/]agent"
|
|
31223
|
+
}
|
|
31224
|
+
]
|
|
31225
|
+
}
|
|
31226
|
+
},
|
|
31227
|
+
{
|
|
31228
|
+
key: "COWORK",
|
|
31229
|
+
name: "cowork",
|
|
31230
|
+
description: "Claude Cowork. Evaluated before `claude_code` so the more specific COWORK marker wins. Requires CLAUDE_CODE_IS_COWORK plus a Claude Code marker.",
|
|
31231
|
+
match: {
|
|
31232
|
+
type: "allOf",
|
|
31233
|
+
conditions: [
|
|
31234
|
+
{ type: "env_set", name: "CLAUDE_CODE_IS_COWORK" },
|
|
31235
|
+
{
|
|
31236
|
+
type: "anyOf",
|
|
31237
|
+
conditions: [
|
|
31238
|
+
{ type: "env_set", name: "CLAUDECODE" },
|
|
31239
|
+
{ type: "env_set", name: "CLAUDE_CODE" }
|
|
31240
|
+
]
|
|
31241
|
+
}
|
|
31242
|
+
]
|
|
31243
|
+
}
|
|
31244
|
+
},
|
|
31245
|
+
{
|
|
31246
|
+
key: "CLAUDE",
|
|
31247
|
+
name: "claude_code",
|
|
31248
|
+
match: {
|
|
31249
|
+
type: "anyOf",
|
|
31250
|
+
conditions: [
|
|
31251
|
+
{ type: "env_set", name: "CLAUDECODE" },
|
|
31252
|
+
{ type: "env_set", name: "CLAUDE_CODE" }
|
|
31253
|
+
]
|
|
31254
|
+
}
|
|
31255
|
+
},
|
|
31256
|
+
{
|
|
31257
|
+
key: "REPLIT",
|
|
31258
|
+
name: "replit",
|
|
31259
|
+
match: {
|
|
31260
|
+
type: "anyOf",
|
|
31261
|
+
conditions: [{ type: "env_set", name: "REPL_ID" }]
|
|
31262
|
+
}
|
|
31263
|
+
},
|
|
31264
|
+
{
|
|
31265
|
+
key: "GITHUB_COPILOT",
|
|
31266
|
+
name: "github-copilot",
|
|
31267
|
+
match: {
|
|
31268
|
+
type: "anyOf",
|
|
31269
|
+
conditions: [
|
|
31270
|
+
{ type: "env_set", name: "COPILOT_MODEL" },
|
|
31271
|
+
{ type: "env_set", name: "COPILOT_ALLOW_ALL" },
|
|
31272
|
+
{ type: "env_set", name: "COPILOT_GITHUB_TOKEN" }
|
|
31273
|
+
]
|
|
31274
|
+
}
|
|
31275
|
+
},
|
|
31276
|
+
{
|
|
31277
|
+
key: "KIRO",
|
|
31278
|
+
name: "kiro",
|
|
31279
|
+
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.",
|
|
31280
|
+
match: {
|
|
31281
|
+
type: "allOf",
|
|
31282
|
+
conditions: [
|
|
31283
|
+
{ type: "env_matches", name: "TERM_PROGRAM", pattern: "kiro" },
|
|
31284
|
+
{ type: "no_tty" }
|
|
31285
|
+
]
|
|
31286
|
+
}
|
|
31287
|
+
},
|
|
31288
|
+
{
|
|
31289
|
+
key: "OPENCLAW",
|
|
31290
|
+
name: "openclaw",
|
|
31291
|
+
match: {
|
|
31292
|
+
type: "anyOf",
|
|
31293
|
+
conditions: [{ type: "env_set", name: "OPENCLAW_SHELL" }]
|
|
31294
|
+
}
|
|
31295
|
+
},
|
|
31296
|
+
{
|
|
31297
|
+
key: "DEVIN",
|
|
31298
|
+
name: "devin",
|
|
31299
|
+
match: {
|
|
31300
|
+
type: "anyOf",
|
|
31301
|
+
conditions: [{ type: "file_exists", path: "/opt/.devin" }]
|
|
31302
|
+
}
|
|
31303
|
+
}
|
|
31304
|
+
]
|
|
31115
31305
|
};
|
|
31116
|
-
|
|
31117
|
-
|
|
31118
|
-
|
|
31119
|
-
|
|
31120
|
-
|
|
31121
|
-
|
|
31122
|
-
|
|
31123
|
-
|
|
31124
|
-
|
|
31306
|
+
var import_promises5 = __require("fs/promises");
|
|
31307
|
+
var import_node_fs8 = __require("fs");
|
|
31308
|
+
async function evaluateCondition(condition) {
|
|
31309
|
+
switch (condition.type) {
|
|
31310
|
+
case "env_set":
|
|
31311
|
+
return Boolean(process.env[condition.name]);
|
|
31312
|
+
case "env_value":
|
|
31313
|
+
return process.env[condition.name] === condition.value;
|
|
31314
|
+
case "env_matches": {
|
|
31315
|
+
const value2 = process.env[condition.name];
|
|
31316
|
+
if (!value2) {
|
|
31317
|
+
return false;
|
|
31125
31318
|
}
|
|
31126
|
-
|
|
31127
|
-
return
|
|
31128
|
-
|
|
31129
|
-
|
|
31130
|
-
};
|
|
31319
|
+
try {
|
|
31320
|
+
return new RegExp(condition.pattern).test(value2);
|
|
31321
|
+
} catch {
|
|
31322
|
+
return false;
|
|
31131
31323
|
}
|
|
31132
|
-
return {
|
|
31133
|
-
isAgent: true,
|
|
31134
|
-
agent: { name }
|
|
31135
|
-
};
|
|
31136
31324
|
}
|
|
31325
|
+
case "no_tty":
|
|
31326
|
+
return !process.stdout?.isTTY;
|
|
31327
|
+
case "file_exists":
|
|
31328
|
+
try {
|
|
31329
|
+
await (0, import_promises5.access)(condition.path, import_node_fs8.constants.F_OK);
|
|
31330
|
+
return true;
|
|
31331
|
+
} catch {
|
|
31332
|
+
return false;
|
|
31333
|
+
}
|
|
31334
|
+
case "anyOf":
|
|
31335
|
+
for (const sub of condition.conditions) {
|
|
31336
|
+
if (await evaluateCondition(sub)) {
|
|
31337
|
+
return true;
|
|
31338
|
+
}
|
|
31339
|
+
}
|
|
31340
|
+
return false;
|
|
31341
|
+
case "allOf":
|
|
31342
|
+
for (const sub of condition.conditions) {
|
|
31343
|
+
if (!await evaluateCondition(sub)) {
|
|
31344
|
+
return false;
|
|
31345
|
+
}
|
|
31346
|
+
}
|
|
31347
|
+
return true;
|
|
31348
|
+
default:
|
|
31349
|
+
return false;
|
|
31137
31350
|
}
|
|
31138
|
-
|
|
31139
|
-
|
|
31140
|
-
}
|
|
31141
|
-
|
|
31142
|
-
|
|
31143
|
-
|
|
31144
|
-
|
|
31145
|
-
|
|
31146
|
-
|
|
31147
|
-
|
|
31148
|
-
return { isAgent: true, agent: { name: CODEX } };
|
|
31149
|
-
}
|
|
31150
|
-
if (process.env.ANTIGRAVITY_AGENT) {
|
|
31151
|
-
return { isAgent: true, agent: { name: ANTIGRAVITY } };
|
|
31351
|
+
}
|
|
31352
|
+
var KNOWN_AGENTS = Object.fromEntries(
|
|
31353
|
+
agents_default.agents.map(({ key, name }) => [key, name])
|
|
31354
|
+
);
|
|
31355
|
+
var agents = agents_default.agents;
|
|
31356
|
+
var aiAgentVar = agents_default.aiAgentVar;
|
|
31357
|
+
function resolveAiAgentStandard() {
|
|
31358
|
+
const raw = process.env[aiAgentVar];
|
|
31359
|
+
if (!raw) {
|
|
31360
|
+
return void 0;
|
|
31152
31361
|
}
|
|
31153
|
-
|
|
31154
|
-
|
|
31362
|
+
const value2 = raw.trim();
|
|
31363
|
+
if (!value2) {
|
|
31364
|
+
return void 0;
|
|
31155
31365
|
}
|
|
31156
|
-
|
|
31157
|
-
|
|
31366
|
+
return value2;
|
|
31367
|
+
}
|
|
31368
|
+
async function determineAgent2() {
|
|
31369
|
+
const aiAgentStandard = resolveAiAgentStandard();
|
|
31370
|
+
if (aiAgentStandard) {
|
|
31371
|
+
return { isAgent: true, agent: { name: aiAgentStandard } };
|
|
31158
31372
|
}
|
|
31159
|
-
|
|
31160
|
-
if (
|
|
31161
|
-
return { isAgent: true, agent: { name:
|
|
31373
|
+
for (const agent of agents) {
|
|
31374
|
+
if (await evaluateCondition(agent.match)) {
|
|
31375
|
+
return { isAgent: true, agent: { name: agent.name } };
|
|
31162
31376
|
}
|
|
31163
|
-
return { isAgent: true, agent: { name: CLAUDE } };
|
|
31164
|
-
}
|
|
31165
|
-
if (process.env.REPL_ID) {
|
|
31166
|
-
return { isAgent: true, agent: { name: REPLIT } };
|
|
31167
|
-
}
|
|
31168
|
-
if (process.env.COPILOT_MODEL || process.env.COPILOT_ALLOW_ALL || process.env.COPILOT_GITHUB_TOKEN) {
|
|
31169
|
-
return { isAgent: true, agent: { name: GITHUB_COPILOT } };
|
|
31170
|
-
}
|
|
31171
|
-
try {
|
|
31172
|
-
await (0, import_promises5.access)(DEVIN_LOCAL_PATH, import_node_fs8.constants.F_OK);
|
|
31173
|
-
return { isAgent: true, agent: { name: DEVIN } };
|
|
31174
|
-
} catch (_error) {
|
|
31175
31377
|
}
|
|
31176
31378
|
return { isAgent: false, agent: void 0 };
|
|
31177
31379
|
}
|
|
@@ -56838,7 +57040,7 @@ init_esm_shims();
|
|
|
56838
57040
|
var package_default = {
|
|
56839
57041
|
name: "@wix/create-app",
|
|
56840
57042
|
description: "Create Wix apps",
|
|
56841
|
-
version: "0.0.
|
|
57043
|
+
version: "0.0.248",
|
|
56842
57044
|
author: "Ihor Machuzhak",
|
|
56843
57045
|
bin: "bin/index.cjs",
|
|
56844
57046
|
devDependencies: {
|
|
@@ -56848,7 +57050,6 @@ var package_default = {
|
|
|
56848
57050
|
"@types/react": "^18.3.3",
|
|
56849
57051
|
"@types/semver": "^7.5.8",
|
|
56850
57052
|
"@types/validate-npm-package-name": "^4.0.2",
|
|
56851
|
-
"@vercel/detect-agent": "^1.2.3",
|
|
56852
57053
|
"@wix/bi-logger-dev-tools-data": "^1.169.0",
|
|
56853
57054
|
"@wix/cli-auth": "workspace:*",
|
|
56854
57055
|
"@wix/cli-error": "workspace:*",
|
|
@@ -56867,6 +57068,7 @@ var package_default = {
|
|
|
56867
57068
|
"@wix/package-manager": "workspace:*",
|
|
56868
57069
|
"@wix/tsup-configs": "workspace:*",
|
|
56869
57070
|
commander: "^13.0.0",
|
|
57071
|
+
"detect-agent": "^1.2.0",
|
|
56870
57072
|
globby: "^14.1.0",
|
|
56871
57073
|
"is-git-url": "^1.0.0",
|
|
56872
57074
|
lodash: "^4.18.1",
|
|
@@ -67893,7 +68095,7 @@ function getTasks({
|
|
|
67893
68095
|
cause: e2
|
|
67894
68096
|
});
|
|
67895
68097
|
}
|
|
67896
|
-
const { generateApp } = await import("./generator-
|
|
68098
|
+
const { generateApp } = await import("./generator-233OYLKO.js");
|
|
67897
68099
|
await generateApp({
|
|
67898
68100
|
packageName,
|
|
67899
68101
|
packageFolder,
|