@donotdev/cli 0.0.37 → 0.1.1
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/LICENSE.md +21 -48
- package/dependencies-matrix.json +108 -58
- package/dist/bin/commands/agent-setup.js +7196 -123
- package/dist/bin/commands/build.js +3341 -207
- package/dist/bin/commands/bump.js +268 -24
- package/dist/bin/commands/cacheout.js +262 -13
- package/dist/bin/commands/coach.js +365 -61
- package/dist/bin/commands/create-app.js +261 -14
- package/dist/bin/commands/create-project.js +270 -15
- package/dist/bin/commands/db.js +10743 -2346
- package/dist/bin/commands/deploy.js +4202 -776
- package/dist/bin/commands/dev.js +353 -38
- package/dist/bin/commands/doctor.js +412 -108
- package/dist/bin/commands/emu.js +392 -57
- package/dist/bin/commands/format.js +250 -15
- package/dist/bin/commands/get-demo.js +261 -14
- package/dist/bin/commands/make-admin.js +10022 -1552
- package/dist/bin/commands/preview.js +353 -38
- package/dist/bin/commands/seed.js +10743 -2346
- package/dist/bin/commands/setup-cicd.js +456 -133
- package/dist/bin/commands/setup.js +428 -125
- package/dist/bin/commands/staging.js +4202 -776
- package/dist/bin/commands/sync-secrets.js +250 -14
- package/dist/bin/commands/type-check.js +249 -13
- package/dist/bin/commands/wai.js +249 -13
- package/dist/bin/dndev.js +33 -4
- package/dist/bin/donotdev.js +33 -4
- package/dist/index.js +4278 -856
- package/{templates/root-consumer/guides/dndev/advanced/VERSION_CONTROL.md.example → guidelines/VERSION_CONTROL.md} +7 -11
- package/package.json +3 -2
- package/templates/app-demo/src/themes.css.example +21 -0
- package/templates/app-dndev/index.html.example +0 -3
- package/templates/app-dndev/src/themes.css.example +21 -0
- package/templates/app-next/src/app/layout.tsx.example +13 -4
- package/templates/app-next/src/themes.css.example +21 -0
- package/templates/app-vite/csp.example.json +44 -0
- package/templates/app-vite/index.html.example +0 -3
- package/templates/app-vite/src/themes.css.example +21 -0
- package/templates/functions-supabase/supabase/functions/.env.example +12 -0
- package/templates/functions-supabase/supabase/functions/disconnect-oauth/index.ts.example +7 -0
- package/templates/functions-supabase/supabase/functions/exchange-token/index.ts.example +7 -0
- package/templates/functions-supabase/supabase/functions/get-connections/index.ts.example +7 -0
- package/templates/functions-supabase/supabase/functions/refresh-token/index.ts.example +7 -0
- package/templates/functions-supabase/supabase/migrations/20250101000000_idempotency.sql +3 -0
- package/templates/functions-supabase/supabase/migrations/20250101000001_rate_limits.sql +3 -0
- package/templates/functions-supabase/supabase/migrations/20250101000003_operation_metrics.sql +3 -0
- package/templates/preset-admin/src/pages/DashboardPage.tsx.example +189 -0
- package/templates/preset-admin/src/pages/EntityPage.tsx.example +84 -0
- package/templates/preset-admin/src/pages/ReportsPage.tsx.example +243 -0
- package/templates/preset-admin/src/pages/SettingsPage.tsx.example +283 -0
- package/templates/preset-admin/src/pages/UsersPage.tsx.example +128 -0
- package/templates/preset-ecommerce/src/pages/CartPage.tsx.example +167 -0
- package/templates/preset-ecommerce/src/pages/CatalogPage.tsx.example +187 -0
- package/templates/preset-ecommerce/src/pages/CheckoutPage.tsx.example +244 -0
- package/templates/preset-ecommerce/src/pages/HomePage.tsx.example +268 -0
- package/templates/preset-ecommerce/src/pages/ProductPage.tsx.example +228 -0
- package/templates/preset-landing/src/pages/AboutPage.tsx.example +237 -0
- package/templates/preset-landing/src/pages/ContactPage.tsx.example +192 -0
- package/templates/preset-landing/src/pages/HomePage.tsx.example +399 -0
- package/templates/preset-saas/src/pages/DashboardPage.tsx.example +195 -0
- package/templates/preset-saas/src/pages/HomePage.tsx.example +270 -0
- package/templates/preset-saas/src/pages/PricingPage.tsx.example +204 -0
- package/templates/preset-saas/src/pages/ProfilePage.tsx.example +191 -0
- package/templates/preset-saas/src/pages/SettingsPage.tsx.example +292 -0
- package/templates/root-consumer/.claude/hooks/framework-compliance.sh.example +56 -0
- package/templates/root-consumer/.claude/hooks/guard-bash.sh.example +61 -0
- package/templates/root-consumer/.claude/hooks/guard-files.sh.example +46 -0
- package/templates/root-consumer/.claude/hooks/guard-mcp.sh.example +91 -0
- package/templates/root-consumer/.claude/hooks/guard-secrets.sh.example +67 -0
- package/templates/root-consumer/.claude/hooks/guard-write.sh.example +89 -0
- package/templates/root-consumer/.claude/hooks/session-start.sh.example +50 -0
- package/templates/root-consumer/.claude/hooks/track-mcp-lookup.sh.example +20 -0
- package/templates/root-consumer/.claude/hooks/typecheck-stop.sh.example +18 -0
- package/templates/root-consumer/.claude/rules/consumer-ux.md.example +32 -0
- package/templates/root-consumer/.claude/rules/definition-of-done.md.example +32 -0
- package/templates/root-consumer/.claude/rules/framework.md.example +39 -0
- package/templates/root-consumer/.claude/rules/git.md.example +14 -0
- package/templates/root-consumer/.claude/rules/security.md.example +13 -0
- package/templates/root-consumer/.claude/settings.json.example +123 -1
- package/templates/root-consumer/.claude/skills/brainstorm/SKILL.md.example +16 -0
- package/templates/root-consumer/.claude/skills/build/SKILL.md.example +103 -25
- package/templates/root-consumer/.claude/skills/design/SKILL.md.example +17 -0
- package/templates/root-consumer/.claude/skills/grill/SKILL.md.example +33 -16
- package/templates/root-consumer/.claude/skills/polish/SKILL.md.example +50 -37
- package/templates/root-consumer/AI.md.example +2 -2
- package/templates/root-consumer/CLAUDE.md.example +33 -1
- package/templates/root-consumer/guides/dndev/INDEX.md.example +23 -27
- package/templates/root-consumer/guides/dndev/SETUP_AUTH.md.example +3 -2
- package/templates/root-consumer/guides/dndev/SETUP_OAUTH.md.example +12 -6
- package/templates/root-consumer/guides/dndev/SETUP_SUPABASE.md.example +50 -3
- package/templates/root-consumer/guides/wai-way/blueprints/3_compose.md.example +13 -15
- package/templates/app-demo/public/manifest.json.example +0 -10
- package/templates/app-dndev/public/manifest.json.example +0 -10
- package/templates/root-consumer/.claude/commands/brainstorm.md.example +0 -147
- package/templates/root-consumer/.claude/commands/build.md.example +0 -131
- package/templates/root-consumer/.claude/commands/design.md.example +0 -153
- package/templates/root-consumer/.claude/commands/grill.md.example +0 -108
- package/templates/root-consumer/.claude/commands/polish.md.example +0 -146
- package/templates/root-consumer/.claude/commands/techdebt.md.example +0 -28
- package/templates/root-consumer/guides/dndev/COMPONENTS_ATOMIC.md.example +0 -180
- package/templates/root-consumer/guides/dndev/COMPONENTS_CRUD.md.example +0 -234
- package/templates/root-consumer/guides/dndev/COMPONENTS_UI.md.example +0 -136
- package/templates/root-consumer/guides/dndev/COMPONENT_API.md.example +0 -195
- package/templates/root-consumer/guides/dndev/ENV_SETUP.md.example +0 -219
- package/templates/root-consumer/guides/dndev/GOTCHAS.md.example +0 -197
- package/templates/root-consumer/guides/dndev/SETUP_APP_CONFIG.md.example +0 -132
- package/templates/root-consumer/guides/dndev/SETUP_BLOG.md.example +0 -280
- package/templates/root-consumer/guides/dndev/SETUP_CICD.md.example +0 -115
- package/templates/root-consumer/guides/dndev/SETUP_CRUD.md.example +0 -334
- package/templates/root-consumer/guides/dndev/SETUP_FUNCTIONS.md.example +0 -9
- package/templates/root-consumer/guides/dndev/SETUP_I18N.md.example +0 -233
- package/templates/root-consumer/guides/dndev/SETUP_LAYOUTS.md.example +0 -158
- package/templates/root-consumer/guides/dndev/SETUP_PAGES.md.example +0 -205
- package/templates/root-consumer/guides/dndev/SETUP_PWA.md.example +0 -213
- package/templates/root-consumer/guides/dndev/SETUP_TESTING.md.example +0 -184
- package/templates/root-consumer/guides/dndev/SETUP_THEMES.md.example +0 -111
- package/templates/root-consumer/guides/dndev/SETUP_VERCEL.md.example +0 -260
- package/templates/root-consumer/guides/dndev/USE_ROUTING.md.example +0 -499
- package/templates/root-consumer/guides/dndev/essences_reference.css.example +0 -288
|
@@ -2457,14 +2457,15 @@ var require_braces = __commonJS({
|
|
|
2457
2457
|
}
|
|
2458
2458
|
});
|
|
2459
2459
|
|
|
2460
|
-
// node_modules/.bun/picomatch@2.3.
|
|
2460
|
+
// node_modules/.bun/picomatch@2.3.2/node_modules/picomatch/lib/constants.js
|
|
2461
2461
|
var require_constants2 = __commonJS({
|
|
2462
|
-
"node_modules/.bun/picomatch@2.3.
|
|
2462
|
+
"node_modules/.bun/picomatch@2.3.2/node_modules/picomatch/lib/constants.js"(exports, module) {
|
|
2463
2463
|
"use strict";
|
|
2464
2464
|
init_utils();
|
|
2465
2465
|
var path = __require("path");
|
|
2466
2466
|
var WIN_SLASH = "\\\\/";
|
|
2467
2467
|
var WIN_NO_SLASH = `[^${WIN_SLASH}]`;
|
|
2468
|
+
var DEFAULT_MAX_EXTGLOB_RECURSION = 0;
|
|
2468
2469
|
var DOT_LITERAL = "\\.";
|
|
2469
2470
|
var PLUS_LITERAL = "\\+";
|
|
2470
2471
|
var QMARK_LITERAL = "\\?";
|
|
@@ -2512,6 +2513,7 @@ var require_constants2 = __commonJS({
|
|
|
2512
2513
|
END_ANCHOR: `(?:[${WIN_SLASH}]|$)`
|
|
2513
2514
|
};
|
|
2514
2515
|
var POSIX_REGEX_SOURCE = {
|
|
2516
|
+
__proto__: null,
|
|
2515
2517
|
alnum: "a-zA-Z0-9",
|
|
2516
2518
|
alpha: "a-zA-Z",
|
|
2517
2519
|
ascii: "\\x00-\\x7F",
|
|
@@ -2528,6 +2530,7 @@ var require_constants2 = __commonJS({
|
|
|
2528
2530
|
xdigit: "A-Fa-f0-9"
|
|
2529
2531
|
};
|
|
2530
2532
|
module.exports = {
|
|
2533
|
+
DEFAULT_MAX_EXTGLOB_RECURSION,
|
|
2531
2534
|
MAX_LENGTH: 1024 * 64,
|
|
2532
2535
|
POSIX_REGEX_SOURCE,
|
|
2533
2536
|
// regular expressions
|
|
@@ -2539,6 +2542,7 @@ var require_constants2 = __commonJS({
|
|
|
2539
2542
|
REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
|
|
2540
2543
|
// Replace globs with equivalent patterns to reduce parsing time.
|
|
2541
2544
|
REPLACEMENTS: {
|
|
2545
|
+
__proto__: null,
|
|
2542
2546
|
"***": "*",
|
|
2543
2547
|
"**/**": "**",
|
|
2544
2548
|
"**/**/**": "**"
|
|
@@ -2655,9 +2659,9 @@ var require_constants2 = __commonJS({
|
|
|
2655
2659
|
}
|
|
2656
2660
|
});
|
|
2657
2661
|
|
|
2658
|
-
// node_modules/.bun/picomatch@2.3.
|
|
2662
|
+
// node_modules/.bun/picomatch@2.3.2/node_modules/picomatch/lib/utils.js
|
|
2659
2663
|
var require_utils2 = __commonJS({
|
|
2660
|
-
"node_modules/.bun/picomatch@2.3.
|
|
2664
|
+
"node_modules/.bun/picomatch@2.3.2/node_modules/picomatch/lib/utils.js"(exports) {
|
|
2661
2665
|
"use strict";
|
|
2662
2666
|
init_utils();
|
|
2663
2667
|
var path = __require("path");
|
|
@@ -2717,9 +2721,9 @@ var require_utils2 = __commonJS({
|
|
|
2717
2721
|
}
|
|
2718
2722
|
});
|
|
2719
2723
|
|
|
2720
|
-
// node_modules/.bun/picomatch@2.3.
|
|
2724
|
+
// node_modules/.bun/picomatch@2.3.2/node_modules/picomatch/lib/scan.js
|
|
2721
2725
|
var require_scan = __commonJS({
|
|
2722
|
-
"node_modules/.bun/picomatch@2.3.
|
|
2726
|
+
"node_modules/.bun/picomatch@2.3.2/node_modules/picomatch/lib/scan.js"(exports, module) {
|
|
2723
2727
|
"use strict";
|
|
2724
2728
|
init_utils();
|
|
2725
2729
|
var utils = require_utils2();
|
|
@@ -3048,9 +3052,9 @@ var require_scan = __commonJS({
|
|
|
3048
3052
|
}
|
|
3049
3053
|
});
|
|
3050
3054
|
|
|
3051
|
-
// node_modules/.bun/picomatch@2.3.
|
|
3055
|
+
// node_modules/.bun/picomatch@2.3.2/node_modules/picomatch/lib/parse.js
|
|
3052
3056
|
var require_parse2 = __commonJS({
|
|
3053
|
-
"node_modules/.bun/picomatch@2.3.
|
|
3057
|
+
"node_modules/.bun/picomatch@2.3.2/node_modules/picomatch/lib/parse.js"(exports, module) {
|
|
3054
3058
|
"use strict";
|
|
3055
3059
|
init_utils();
|
|
3056
3060
|
var constants2 = require_constants2();
|
|
@@ -3078,6 +3082,213 @@ var require_parse2 = __commonJS({
|
|
|
3078
3082
|
var syntaxError = (type, char) => {
|
|
3079
3083
|
return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
|
|
3080
3084
|
};
|
|
3085
|
+
var splitTopLevel = (input) => {
|
|
3086
|
+
const parts = [];
|
|
3087
|
+
let bracket = 0;
|
|
3088
|
+
let paren = 0;
|
|
3089
|
+
let quote = 0;
|
|
3090
|
+
let value = "";
|
|
3091
|
+
let escaped = false;
|
|
3092
|
+
for (const ch of input) {
|
|
3093
|
+
if (escaped === true) {
|
|
3094
|
+
value += ch;
|
|
3095
|
+
escaped = false;
|
|
3096
|
+
continue;
|
|
3097
|
+
}
|
|
3098
|
+
if (ch === "\\") {
|
|
3099
|
+
value += ch;
|
|
3100
|
+
escaped = true;
|
|
3101
|
+
continue;
|
|
3102
|
+
}
|
|
3103
|
+
if (ch === '"') {
|
|
3104
|
+
quote = quote === 1 ? 0 : 1;
|
|
3105
|
+
value += ch;
|
|
3106
|
+
continue;
|
|
3107
|
+
}
|
|
3108
|
+
if (quote === 0) {
|
|
3109
|
+
if (ch === "[") {
|
|
3110
|
+
bracket++;
|
|
3111
|
+
} else if (ch === "]" && bracket > 0) {
|
|
3112
|
+
bracket--;
|
|
3113
|
+
} else if (bracket === 0) {
|
|
3114
|
+
if (ch === "(") {
|
|
3115
|
+
paren++;
|
|
3116
|
+
} else if (ch === ")" && paren > 0) {
|
|
3117
|
+
paren--;
|
|
3118
|
+
} else if (ch === "|" && paren === 0) {
|
|
3119
|
+
parts.push(value);
|
|
3120
|
+
value = "";
|
|
3121
|
+
continue;
|
|
3122
|
+
}
|
|
3123
|
+
}
|
|
3124
|
+
}
|
|
3125
|
+
value += ch;
|
|
3126
|
+
}
|
|
3127
|
+
parts.push(value);
|
|
3128
|
+
return parts;
|
|
3129
|
+
};
|
|
3130
|
+
var isPlainBranch = (branch) => {
|
|
3131
|
+
let escaped = false;
|
|
3132
|
+
for (const ch of branch) {
|
|
3133
|
+
if (escaped === true) {
|
|
3134
|
+
escaped = false;
|
|
3135
|
+
continue;
|
|
3136
|
+
}
|
|
3137
|
+
if (ch === "\\") {
|
|
3138
|
+
escaped = true;
|
|
3139
|
+
continue;
|
|
3140
|
+
}
|
|
3141
|
+
if (/[?*+@!()[\]{}]/.test(ch)) {
|
|
3142
|
+
return false;
|
|
3143
|
+
}
|
|
3144
|
+
}
|
|
3145
|
+
return true;
|
|
3146
|
+
};
|
|
3147
|
+
var normalizeSimpleBranch = (branch) => {
|
|
3148
|
+
let value = branch.trim();
|
|
3149
|
+
let changed = true;
|
|
3150
|
+
while (changed === true) {
|
|
3151
|
+
changed = false;
|
|
3152
|
+
if (/^@\([^\\()[\]{}|]+\)$/.test(value)) {
|
|
3153
|
+
value = value.slice(2, -1);
|
|
3154
|
+
changed = true;
|
|
3155
|
+
}
|
|
3156
|
+
}
|
|
3157
|
+
if (!isPlainBranch(value)) {
|
|
3158
|
+
return;
|
|
3159
|
+
}
|
|
3160
|
+
return value.replace(/\\(.)/g, "$1");
|
|
3161
|
+
};
|
|
3162
|
+
var hasRepeatedCharPrefixOverlap = (branches) => {
|
|
3163
|
+
const values = branches.map(normalizeSimpleBranch).filter(Boolean);
|
|
3164
|
+
for (let i = 0; i < values.length; i++) {
|
|
3165
|
+
for (let j2 = i + 1; j2 < values.length; j2++) {
|
|
3166
|
+
const a = values[i];
|
|
3167
|
+
const b3 = values[j2];
|
|
3168
|
+
const char = a[0];
|
|
3169
|
+
if (!char || a !== char.repeat(a.length) || b3 !== char.repeat(b3.length)) {
|
|
3170
|
+
continue;
|
|
3171
|
+
}
|
|
3172
|
+
if (a === b3 || a.startsWith(b3) || b3.startsWith(a)) {
|
|
3173
|
+
return true;
|
|
3174
|
+
}
|
|
3175
|
+
}
|
|
3176
|
+
}
|
|
3177
|
+
return false;
|
|
3178
|
+
};
|
|
3179
|
+
var parseRepeatedExtglob = (pattern, requireEnd = true) => {
|
|
3180
|
+
if (pattern[0] !== "+" && pattern[0] !== "*" || pattern[1] !== "(") {
|
|
3181
|
+
return;
|
|
3182
|
+
}
|
|
3183
|
+
let bracket = 0;
|
|
3184
|
+
let paren = 0;
|
|
3185
|
+
let quote = 0;
|
|
3186
|
+
let escaped = false;
|
|
3187
|
+
for (let i = 1; i < pattern.length; i++) {
|
|
3188
|
+
const ch = pattern[i];
|
|
3189
|
+
if (escaped === true) {
|
|
3190
|
+
escaped = false;
|
|
3191
|
+
continue;
|
|
3192
|
+
}
|
|
3193
|
+
if (ch === "\\") {
|
|
3194
|
+
escaped = true;
|
|
3195
|
+
continue;
|
|
3196
|
+
}
|
|
3197
|
+
if (ch === '"') {
|
|
3198
|
+
quote = quote === 1 ? 0 : 1;
|
|
3199
|
+
continue;
|
|
3200
|
+
}
|
|
3201
|
+
if (quote === 1) {
|
|
3202
|
+
continue;
|
|
3203
|
+
}
|
|
3204
|
+
if (ch === "[") {
|
|
3205
|
+
bracket++;
|
|
3206
|
+
continue;
|
|
3207
|
+
}
|
|
3208
|
+
if (ch === "]" && bracket > 0) {
|
|
3209
|
+
bracket--;
|
|
3210
|
+
continue;
|
|
3211
|
+
}
|
|
3212
|
+
if (bracket > 0) {
|
|
3213
|
+
continue;
|
|
3214
|
+
}
|
|
3215
|
+
if (ch === "(") {
|
|
3216
|
+
paren++;
|
|
3217
|
+
continue;
|
|
3218
|
+
}
|
|
3219
|
+
if (ch === ")") {
|
|
3220
|
+
paren--;
|
|
3221
|
+
if (paren === 0) {
|
|
3222
|
+
if (requireEnd === true && i !== pattern.length - 1) {
|
|
3223
|
+
return;
|
|
3224
|
+
}
|
|
3225
|
+
return {
|
|
3226
|
+
type: pattern[0],
|
|
3227
|
+
body: pattern.slice(2, i),
|
|
3228
|
+
end: i
|
|
3229
|
+
};
|
|
3230
|
+
}
|
|
3231
|
+
}
|
|
3232
|
+
}
|
|
3233
|
+
};
|
|
3234
|
+
var getStarExtglobSequenceOutput = (pattern) => {
|
|
3235
|
+
let index = 0;
|
|
3236
|
+
const chars = [];
|
|
3237
|
+
while (index < pattern.length) {
|
|
3238
|
+
const match = parseRepeatedExtglob(pattern.slice(index), false);
|
|
3239
|
+
if (!match || match.type !== "*") {
|
|
3240
|
+
return;
|
|
3241
|
+
}
|
|
3242
|
+
const branches = splitTopLevel(match.body).map((branch2) => branch2.trim());
|
|
3243
|
+
if (branches.length !== 1) {
|
|
3244
|
+
return;
|
|
3245
|
+
}
|
|
3246
|
+
const branch = normalizeSimpleBranch(branches[0]);
|
|
3247
|
+
if (!branch || branch.length !== 1) {
|
|
3248
|
+
return;
|
|
3249
|
+
}
|
|
3250
|
+
chars.push(branch);
|
|
3251
|
+
index += match.end + 1;
|
|
3252
|
+
}
|
|
3253
|
+
if (chars.length < 1) {
|
|
3254
|
+
return;
|
|
3255
|
+
}
|
|
3256
|
+
const source = chars.length === 1 ? utils.escapeRegex(chars[0]) : `[${chars.map((ch) => utils.escapeRegex(ch)).join("")}]`;
|
|
3257
|
+
return `${source}*`;
|
|
3258
|
+
};
|
|
3259
|
+
var repeatedExtglobRecursion = (pattern) => {
|
|
3260
|
+
let depth = 0;
|
|
3261
|
+
let value = pattern.trim();
|
|
3262
|
+
let match = parseRepeatedExtglob(value);
|
|
3263
|
+
while (match) {
|
|
3264
|
+
depth++;
|
|
3265
|
+
value = match.body.trim();
|
|
3266
|
+
match = parseRepeatedExtglob(value);
|
|
3267
|
+
}
|
|
3268
|
+
return depth;
|
|
3269
|
+
};
|
|
3270
|
+
var analyzeRepeatedExtglob = (body, options) => {
|
|
3271
|
+
if (options.maxExtglobRecursion === false) {
|
|
3272
|
+
return { risky: false };
|
|
3273
|
+
}
|
|
3274
|
+
const max = typeof options.maxExtglobRecursion === "number" ? options.maxExtglobRecursion : constants2.DEFAULT_MAX_EXTGLOB_RECURSION;
|
|
3275
|
+
const branches = splitTopLevel(body).map((branch) => branch.trim());
|
|
3276
|
+
if (branches.length > 1) {
|
|
3277
|
+
if (branches.some((branch) => branch === "") || branches.some((branch) => /^[*?]+$/.test(branch)) || hasRepeatedCharPrefixOverlap(branches)) {
|
|
3278
|
+
return { risky: true };
|
|
3279
|
+
}
|
|
3280
|
+
}
|
|
3281
|
+
for (const branch of branches) {
|
|
3282
|
+
const safeOutput = getStarExtglobSequenceOutput(branch);
|
|
3283
|
+
if (safeOutput) {
|
|
3284
|
+
return { risky: true, safeOutput };
|
|
3285
|
+
}
|
|
3286
|
+
if (repeatedExtglobRecursion(branch) > max) {
|
|
3287
|
+
return { risky: true };
|
|
3288
|
+
}
|
|
3289
|
+
}
|
|
3290
|
+
return { risky: false };
|
|
3291
|
+
};
|
|
3081
3292
|
var parse2 = (input, options) => {
|
|
3082
3293
|
if (typeof input !== "string") {
|
|
3083
3294
|
throw new TypeError("Expected a string");
|
|
@@ -3209,6 +3420,8 @@ var require_parse2 = __commonJS({
|
|
|
3209
3420
|
token.prev = prev;
|
|
3210
3421
|
token.parens = state.parens;
|
|
3211
3422
|
token.output = state.output;
|
|
3423
|
+
token.startIndex = state.index;
|
|
3424
|
+
token.tokensIndex = tokens.length;
|
|
3212
3425
|
const output = (opts.capture ? "(" : "") + token.open;
|
|
3213
3426
|
increment("parens");
|
|
3214
3427
|
push({ type, value: value2, output: state.output ? "" : ONE_CHAR });
|
|
@@ -3216,6 +3429,26 @@ var require_parse2 = __commonJS({
|
|
|
3216
3429
|
extglobs.push(token);
|
|
3217
3430
|
};
|
|
3218
3431
|
const extglobClose = (token) => {
|
|
3432
|
+
const literal = input.slice(token.startIndex, state.index + 1);
|
|
3433
|
+
const body = input.slice(token.startIndex + 2, state.index);
|
|
3434
|
+
const analysis = analyzeRepeatedExtglob(body, opts);
|
|
3435
|
+
if ((token.type === "plus" || token.type === "star") && analysis.risky) {
|
|
3436
|
+
const safeOutput = analysis.safeOutput ? (token.output ? "" : ONE_CHAR) + (opts.capture ? `(${analysis.safeOutput})` : analysis.safeOutput) : void 0;
|
|
3437
|
+
const open = tokens[token.tokensIndex];
|
|
3438
|
+
open.type = "text";
|
|
3439
|
+
open.value = literal;
|
|
3440
|
+
open.output = safeOutput || utils.escapeRegex(literal);
|
|
3441
|
+
for (let i = token.tokensIndex + 1; i < tokens.length; i++) {
|
|
3442
|
+
tokens[i].value = "";
|
|
3443
|
+
tokens[i].output = "";
|
|
3444
|
+
delete tokens[i].suffix;
|
|
3445
|
+
}
|
|
3446
|
+
state.output = token.output + open.output;
|
|
3447
|
+
state.backtrack = true;
|
|
3448
|
+
push({ type: "paren", extglob: true, value, output: "" });
|
|
3449
|
+
decrement("parens");
|
|
3450
|
+
return;
|
|
3451
|
+
}
|
|
3219
3452
|
let output = token.close + (opts.capture ? ")" : "");
|
|
3220
3453
|
let rest;
|
|
3221
3454
|
if (token.type === "negate") {
|
|
@@ -3822,9 +4055,9 @@ var require_parse2 = __commonJS({
|
|
|
3822
4055
|
}
|
|
3823
4056
|
});
|
|
3824
4057
|
|
|
3825
|
-
// node_modules/.bun/picomatch@2.3.
|
|
4058
|
+
// node_modules/.bun/picomatch@2.3.2/node_modules/picomatch/lib/picomatch.js
|
|
3826
4059
|
var require_picomatch = __commonJS({
|
|
3827
|
-
"node_modules/.bun/picomatch@2.3.
|
|
4060
|
+
"node_modules/.bun/picomatch@2.3.2/node_modules/picomatch/lib/picomatch.js"(exports, module) {
|
|
3828
4061
|
"use strict";
|
|
3829
4062
|
init_utils();
|
|
3830
4063
|
var path = __require("path");
|
|
@@ -3964,9 +4197,9 @@ var require_picomatch = __commonJS({
|
|
|
3964
4197
|
}
|
|
3965
4198
|
});
|
|
3966
4199
|
|
|
3967
|
-
// node_modules/.bun/picomatch@2.3.
|
|
4200
|
+
// node_modules/.bun/picomatch@2.3.2/node_modules/picomatch/index.js
|
|
3968
4201
|
var require_picomatch2 = __commonJS({
|
|
3969
|
-
"node_modules/.bun/picomatch@2.3.
|
|
4202
|
+
"node_modules/.bun/picomatch@2.3.2/node_modules/picomatch/index.js"(exports, module) {
|
|
3970
4203
|
"use strict";
|
|
3971
4204
|
init_utils();
|
|
3972
4205
|
module.exports = require_picomatch();
|
|
@@ -7762,7 +7995,10 @@ var init_PathResolver = __esm({
|
|
|
7762
7995
|
*/
|
|
7763
7996
|
getEmptyCjsModulePath() {
|
|
7764
7997
|
const resolved = this.resolvePackage("@donotdev/core/empty");
|
|
7765
|
-
if (!resolved)
|
|
7998
|
+
if (!resolved)
|
|
7999
|
+
throw new Error(
|
|
8000
|
+
"Cannot resolve @donotdev/core/empty \u2014 package setup is broken"
|
|
8001
|
+
);
|
|
7766
8002
|
return resolved;
|
|
7767
8003
|
}
|
|
7768
8004
|
// === PRIVATE METHODS ===
|
|
@@ -8140,14 +8376,25 @@ function flattenGroups(groups, options) {
|
|
|
8140
8376
|
const flat = {};
|
|
8141
8377
|
for (const group of Object.values(groups)) {
|
|
8142
8378
|
if (options?.skipRootExclude && group.rootExclude) continue;
|
|
8143
|
-
for (const [name, version] of Object.entries(group.packages
|
|
8379
|
+
for (const [name, version] of Object.entries(group.packages ?? {})) {
|
|
8144
8380
|
flat[name] = version;
|
|
8145
8381
|
}
|
|
8146
8382
|
}
|
|
8147
8383
|
return flat;
|
|
8148
8384
|
}
|
|
8149
8385
|
function resolveGroup(groupName, matrix) {
|
|
8150
|
-
|
|
8386
|
+
const group = matrix.groups[groupName];
|
|
8387
|
+
if (!group) return {};
|
|
8388
|
+
const result = {};
|
|
8389
|
+
if (group.includes) {
|
|
8390
|
+
for (const included of group.includes) {
|
|
8391
|
+
Object.assign(result, resolveGroup(included, matrix));
|
|
8392
|
+
}
|
|
8393
|
+
}
|
|
8394
|
+
if (group.packages) {
|
|
8395
|
+
Object.assign(result, group.packages);
|
|
8396
|
+
}
|
|
8397
|
+
return result;
|
|
8151
8398
|
}
|
|
8152
8399
|
function resolveGroups(groupNames, matrix) {
|
|
8153
8400
|
const result = {};
|
|
@@ -8272,9 +8519,10 @@ function syncDonotdevToMatrix(matrix, donotdevVersions, dryRun) {
|
|
|
8272
8519
|
changes.push({ pkg: pkgName, from: "N/A", to: `^${actualVersion}` });
|
|
8273
8520
|
continue;
|
|
8274
8521
|
}
|
|
8275
|
-
const
|
|
8522
|
+
const packages = group.packages ??= {};
|
|
8523
|
+
const matrixVersion = packages[pkgName];
|
|
8276
8524
|
if (!matrixVersion) {
|
|
8277
|
-
|
|
8525
|
+
packages[pkgName] = `^${actualVersion}`;
|
|
8278
8526
|
changes.push({ pkg: pkgName, from: "N/A", to: `^${actualVersion}` });
|
|
8279
8527
|
continue;
|
|
8280
8528
|
}
|
|
@@ -8285,7 +8533,7 @@ function syncDonotdevToMatrix(matrix, donotdevVersions, dryRun) {
|
|
|
8285
8533
|
from: matrixVersion,
|
|
8286
8534
|
to: `^${actualVersion}`
|
|
8287
8535
|
});
|
|
8288
|
-
|
|
8536
|
+
packages[pkgName] = `^${actualVersion}`;
|
|
8289
8537
|
}
|
|
8290
8538
|
}
|
|
8291
8539
|
if (changes.length > 0 && !dryRun) {
|
|
@@ -8908,9 +9156,7 @@ init_cli_output();
|
|
|
8908
9156
|
init_pathResolver();
|
|
8909
9157
|
async function queryNpmPackage(packageName) {
|
|
8910
9158
|
try {
|
|
8911
|
-
const res = await fetch(
|
|
8912
|
-
`https://registry.npmjs.org/${packageName}/latest`
|
|
8913
|
-
);
|
|
9159
|
+
const res = await fetch(`https://registry.npmjs.org/${packageName}/latest`);
|
|
8914
9160
|
if (!res.ok) return null;
|
|
8915
9161
|
return await res.json();
|
|
8916
9162
|
} catch {
|
|
@@ -9302,9 +9548,7 @@ async function main(options = {}) {
|
|
|
9302
9548
|
);
|
|
9303
9549
|
summary.push(`Updated ${updatedCount} package.json file(s)`);
|
|
9304
9550
|
if (syncedPins > 0) {
|
|
9305
|
-
summary.push(
|
|
9306
|
-
`Synced ${syncedPins} override/resolution pin(s)`
|
|
9307
|
-
);
|
|
9551
|
+
summary.push(`Synced ${syncedPins} override/resolution pin(s)`);
|
|
9308
9552
|
}
|
|
9309
9553
|
}
|
|
9310
9554
|
if (shouldRemoveDeprecated) {
|