@donotdev/cli 0.0.13 → 0.0.15
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/dependencies-matrix.json +357 -89
- package/dist/bin/commands/agent-setup.d.ts +6 -0
- package/dist/bin/commands/agent-setup.d.ts.map +1 -0
- package/dist/bin/commands/agent-setup.js +629 -0
- package/dist/bin/commands/agent-setup.js.map +1 -0
- package/dist/bin/commands/build.js +131 -50
- package/dist/bin/commands/bump.js +137 -49
- package/dist/bin/commands/cacheout.js +50 -21
- package/dist/bin/commands/create-app.js +270 -261
- package/dist/bin/commands/create-project.js +418 -197
- package/dist/bin/commands/deploy.js +1752 -712
- package/dist/bin/commands/dev.js +151 -35
- package/dist/bin/commands/emu.js +228 -70
- package/dist/bin/commands/format.js +50 -21
- package/dist/bin/commands/lint.js +50 -21
- package/dist/bin/commands/preview.js +155 -35
- package/dist/bin/commands/supabase-setup.d.ts +6 -0
- package/dist/bin/commands/supabase-setup.d.ts.map +1 -0
- package/dist/bin/commands/supabase-setup.js +7 -0
- package/dist/bin/commands/supabase-setup.js.map +1 -0
- package/dist/bin/commands/sync-secrets.js +224 -46
- package/dist/bin/commands/type-check.d.ts +14 -0
- package/dist/bin/commands/type-check.d.ts.map +1 -0
- package/dist/bin/commands/type-check.js +314 -0
- package/dist/bin/commands/type-check.js.map +1 -0
- package/dist/bin/commands/wai.js +7399 -11
- package/dist/bin/dndev.js +27 -2
- package/dist/bin/donotdev.js +27 -2
- package/dist/index.js +3960 -2996
- package/package.json +2 -2
- package/templates/app-demo/src/App.tsx.example +1 -0
- package/templates/app-demo/src/pages/FullPage.tsx.example +2 -2
- package/templates/app-demo/src/pages/components/DemoLayout.tsx.example +2 -2
- package/templates/app-demo/src/themes.css.example +5 -12
- package/templates/app-expo/.env.example +64 -0
- package/templates/app-expo/.expo/README.md.example +5 -0
- package/templates/app-expo/.gitignore.example +36 -0
- package/templates/app-expo/README.md.example +58 -0
- package/templates/app-expo/app/.gitkeep +2 -0
- package/templates/app-expo/app/_layout.tsx.example +41 -0
- package/templates/app-expo/app/form.tsx.example +52 -0
- package/templates/app-expo/app/index.tsx.example +89 -0
- package/templates/app-expo/app/list.tsx.example +32 -0
- package/templates/app-expo/app/profile.tsx.example +76 -0
- package/templates/app-expo/app/signin.tsx.example +53 -0
- package/templates/app-expo/app.json.example +39 -0
- package/templates/app-expo/babel.config.js.example +10 -0
- package/templates/app-expo/eas.json.example +20 -0
- package/templates/app-expo/expo-env.d.ts.example +4 -0
- package/templates/app-expo/metro.config.js.example +20 -0
- package/templates/app-expo/service-account-key.json.example +12 -0
- package/templates/app-expo/tsconfig.json.example +19 -0
- package/templates/app-next/.env.example +4 -33
- package/templates/app-next/src/app/ClientLayout.tsx.example +2 -0
- package/templates/app-next/src/app/layout.tsx.example +7 -6
- package/templates/app-next/src/globals.css.example +2 -11
- package/templates/app-next/src/pages/HomePage.tsx.example +1 -1
- package/templates/app-next/src/themes.css.example +10 -13
- package/templates/app-vite/.env.example +3 -32
- package/templates/app-vite/index.html.example +2 -24
- package/templates/app-vite/src/App.tsx.example +2 -0
- package/templates/app-vite/src/globals.css.example +2 -12
- package/templates/app-vite/src/pages/FormPageExample.tsx.example +1 -2
- package/templates/app-vite/src/pages/HomePage.tsx.example +1 -1
- package/templates/app-vite/src/themes.css.example +109 -79
- package/templates/app-vite/vercel.json.example +11 -0
- package/templates/functions-firebase/build.mjs.example +2 -72
- package/templates/functions-firebase/functions-firebase/.env.example.example +23 -25
- package/templates/functions-firebase/functions-firebase/build.mjs.example +2 -72
- package/templates/functions-firebase/functions-firebase/tsconfig.json.example +1 -1
- package/templates/functions-supabase/supabase/functions/cancel-subscription/index.ts.example +7 -0
- package/templates/functions-supabase/supabase/functions/change-plan/index.ts.example +11 -0
- package/templates/functions-supabase/supabase/functions/create-checkout-session/index.ts.example +11 -0
- package/templates/functions-supabase/supabase/functions/create-customer-portal/index.ts.example +7 -0
- package/templates/functions-supabase/supabase/functions/crud/index.ts.example +16 -0
- package/templates/functions-supabase/supabase/functions/delete-account/index.ts.example +7 -0
- package/templates/functions-supabase/supabase/functions/get-custom-claims/index.ts.example +7 -0
- package/templates/functions-supabase/supabase/functions/get-user-auth-status/index.ts.example +7 -0
- package/templates/functions-supabase/supabase/functions/refresh-subscription-status/index.ts.example +7 -0
- package/templates/functions-supabase/supabase/functions/remove-custom-claims/index.ts.example +7 -0
- package/templates/functions-supabase/supabase/functions/set-custom-claims/index.ts.example +7 -0
- package/templates/functions-supabase/supabase/migrations/20250101000000_idempotency.sql +24 -0
- package/templates/functions-supabase/supabase/migrations/20250101000001_rate_limits.sql +22 -0
- package/templates/functions-supabase/supabase/migrations/20250101000002_cleanup_jobs.sql +28 -0
- package/templates/functions-supabase/supabase/migrations/20250101000003_operation_metrics.sql +28 -0
- package/templates/functions-vercel/functions-vercel/tsconfig.json.example +1 -1
- package/templates/functions-vercel/functions-vercel/vercel.json.example +1 -1
- package/templates/functions-vercel/vercel.json.example +1 -1
- package/templates/github/github/workflows/firebase-deploy.yml.example +1 -1
- package/templates/github/workflows/firebase-deploy.yml.example +1 -1
- package/templates/overlay-firebase/env.fragment.example +34 -0
- package/templates/overlay-firebase/env.fragment.expo.example +34 -0
- package/templates/overlay-firebase/env.fragment.nextjs.example +34 -0
- package/templates/overlay-firebase/src/config/providers.expo.ts.example +49 -0
- package/templates/overlay-firebase/src/config/providers.ts.example +23 -0
- package/templates/overlay-supabase/env.fragment.example +7 -0
- package/templates/overlay-supabase/env.fragment.expo.example +7 -0
- package/templates/overlay-supabase/env.fragment.nextjs.example +7 -0
- package/templates/overlay-supabase/src/config/providers.expo.ts.example +35 -0
- package/templates/overlay-supabase/src/config/providers.ts.example +33 -0
- package/templates/overlay-supabase/vercel.headers.example +23 -0
- package/templates/overlay-supabase/vercel.json.example +22 -0
- package/templates/overlay-vercel/env.fragment.example +34 -0
- package/templates/overlay-vercel/env.fragment.nextjs.example +34 -0
- package/templates/overlay-vercel/src/config/providers.ts.example +24 -0
- package/templates/root-consumer/.claude/agents/architect.md.example +2 -310
- package/templates/root-consumer/.claude/agents/builder.md.example +2 -326
- package/templates/root-consumer/.claude/agents/coder.md.example +2 -83
- package/templates/root-consumer/.claude/agents/extractor.md.example +2 -231
- package/templates/root-consumer/.claude/agents/polisher.md.example +2 -132
- package/templates/root-consumer/.claude/agents/prompt-engineer.md.example +2 -81
- package/templates/root-consumer/.claude/commands/brainstorm.md.example +1 -1
- package/templates/root-consumer/.claude/commands/build.md.example +1 -1
- package/templates/root-consumer/.claude/commands/design.md.example +1 -1
- package/templates/root-consumer/.claude/commands/grill.md.example +30 -0
- package/templates/root-consumer/.claude/commands/polish.md.example +1 -1
- package/templates/root-consumer/.claude/commands/techdebt.md.example +28 -0
- package/templates/root-consumer/.clinerules.example +1 -0
- package/templates/root-consumer/.cursor/rules/no-docs.mdc.example +15 -0
- package/templates/root-consumer/.cursorrules.example +1 -0
- package/templates/root-consumer/.dndev/args.json.example +6 -0
- package/templates/root-consumer/.gemini/settings.json.example +2 -2
- package/templates/root-consumer/.github/copilot-instructions.md.example +1 -0
- package/templates/root-consumer/.windsurfrules.example +1 -0
- package/templates/root-consumer/AI.md.example +25 -108
- package/templates/root-consumer/CLAUDE.md.example +1 -128
- package/templates/root-consumer/CONVENTIONS.md.example +1 -0
- package/templates/root-consumer/GEMINI.md.example +1 -0
- package/templates/root-consumer/firebase.json.example +1 -1
- package/templates/root-consumer/guides/dndev/AGENT_START_HERE.md.example +54 -0
- package/templates/root-consumer/guides/dndev/COMPONENTS_ADV.md.example +0 -18
- package/templates/root-consumer/guides/dndev/COMPONENTS_UI.md.example +1 -1
- package/templates/root-consumer/guides/dndev/ENV_SETUP.md.example +99 -30
- package/templates/root-consumer/guides/dndev/GOTCHAS.md.example +186 -0
- package/templates/root-consumer/guides/dndev/INDEX.md.example +4 -1
- package/templates/root-consumer/guides/dndev/SETUP_CRUD.md.example +143 -12
- package/templates/root-consumer/guides/dndev/SETUP_FIREBASE.md.example +9 -3
- package/templates/root-consumer/guides/dndev/SETUP_FUNCTIONS.md.example +12 -7
- package/templates/root-consumer/guides/dndev/SETUP_SOC2.md.example +234 -0
- package/templates/root-consumer/guides/dndev/SETUP_SUPABASE.md.example +124 -0
- package/templates/root-consumer/guides/dndev/SETUP_THEMES.md.example +6 -2
- package/templates/root-consumer/guides/dndev/SETUP_VERCEL.md.example +176 -0
- package/templates/root-consumer/guides/dndev/USE_ROUTING.md.example +5 -9
- package/templates/root-consumer/guides/dndev/essences_reference.css.example +174 -0
- package/templates/root-consumer/guides/wai-way/agents/builder.md.example +10 -0
- package/templates/root-consumer/guides/wai-way/agents/extractor.md.example +25 -5
- package/templates/root-consumer/guides/wai-way/agents/polisher.md.example +13 -2
- package/templates/root-consumer/guides/wai-way/blueprints/0_brainstorm.md.example +2 -2
- package/templates/root-consumer/guides/wai-way/blueprints/1_scaffold.md.example +47 -11
- package/templates/root-consumer/guides/wai-way/blueprints/3_compose.md.example +15 -4
- package/templates/root-consumer/guides/wai-way/spec_template.md.example +7 -6
- package/templates/app-payload/.env.example +0 -28
- package/templates/app-payload/README.md.example +0 -233
- package/templates/app-payload/collections/Company.ts.example +0 -125
- package/templates/app-payload/collections/Hero.ts.example +0 -62
- package/templates/app-payload/collections/Media.ts.example +0 -41
- package/templates/app-payload/collections/Products.ts.example +0 -115
- package/templates/app-payload/collections/Services.ts.example +0 -104
- package/templates/app-payload/collections/Testimonials.ts.example +0 -92
- package/templates/app-payload/collections/Users.ts.example +0 -35
- package/templates/app-payload/src/server.ts.example +0 -79
- package/templates/app-payload/tsconfig.json.example +0 -24
|
@@ -1596,7 +1596,7 @@ var require_parse = __commonJS({
|
|
|
1596
1596
|
CHAR_NO_BREAK_SPACE,
|
|
1597
1597
|
CHAR_ZERO_WIDTH_NOBREAK_SPACE
|
|
1598
1598
|
} = require_constants();
|
|
1599
|
-
var
|
|
1599
|
+
var parse2 = (input, options = {}) => {
|
|
1600
1600
|
if (typeof input !== "string") {
|
|
1601
1601
|
throw new TypeError("Expected a string");
|
|
1602
1602
|
}
|
|
@@ -1796,7 +1796,7 @@ var require_parse = __commonJS({
|
|
|
1796
1796
|
push({ type: "eos" });
|
|
1797
1797
|
return ast;
|
|
1798
1798
|
};
|
|
1799
|
-
module.exports =
|
|
1799
|
+
module.exports = parse2;
|
|
1800
1800
|
}
|
|
1801
1801
|
});
|
|
1802
1802
|
|
|
@@ -1808,7 +1808,7 @@ var require_braces = __commonJS({
|
|
|
1808
1808
|
var stringify2 = require_stringify();
|
|
1809
1809
|
var compile = require_compile();
|
|
1810
1810
|
var expand = require_expand();
|
|
1811
|
-
var
|
|
1811
|
+
var parse2 = require_parse();
|
|
1812
1812
|
var braces = (input, options = {}) => {
|
|
1813
1813
|
let output = [];
|
|
1814
1814
|
if (Array.isArray(input)) {
|
|
@@ -1828,7 +1828,7 @@ var require_braces = __commonJS({
|
|
|
1828
1828
|
}
|
|
1829
1829
|
return output;
|
|
1830
1830
|
};
|
|
1831
|
-
braces.parse = (input, options = {}) =>
|
|
1831
|
+
braces.parse = (input, options = {}) => parse2(input, options);
|
|
1832
1832
|
braces.stringify = (input, options = {}) => {
|
|
1833
1833
|
if (typeof input === "string") {
|
|
1834
1834
|
return stringify2(braces.parse(input, options), options);
|
|
@@ -2485,7 +2485,7 @@ var require_parse2 = __commonJS({
|
|
|
2485
2485
|
var syntaxError = (type, char) => {
|
|
2486
2486
|
return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
|
|
2487
2487
|
};
|
|
2488
|
-
var
|
|
2488
|
+
var parse2 = (input, options) => {
|
|
2489
2489
|
if (typeof input !== "string") {
|
|
2490
2490
|
throw new TypeError("Expected a string");
|
|
2491
2491
|
}
|
|
@@ -2634,7 +2634,7 @@ var require_parse2 = __commonJS({
|
|
|
2634
2634
|
output = token.close = `)$))${extglobStar}`;
|
|
2635
2635
|
}
|
|
2636
2636
|
if (token.inner.includes("*") && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) {
|
|
2637
|
-
const expression =
|
|
2637
|
+
const expression = parse2(rest, { ...options, fastpaths: false }).output;
|
|
2638
2638
|
output = token.close = `)${expression})${extglobStar})`;
|
|
2639
2639
|
}
|
|
2640
2640
|
if (token.prev.type === "bos") {
|
|
@@ -3159,7 +3159,7 @@ var require_parse2 = __commonJS({
|
|
|
3159
3159
|
}
|
|
3160
3160
|
return state;
|
|
3161
3161
|
};
|
|
3162
|
-
|
|
3162
|
+
parse2.fastpaths = (input, options) => {
|
|
3163
3163
|
const opts = { ...options };
|
|
3164
3164
|
const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
|
|
3165
3165
|
const len = input.length;
|
|
@@ -3225,7 +3225,7 @@ var require_parse2 = __commonJS({
|
|
|
3225
3225
|
}
|
|
3226
3226
|
return source;
|
|
3227
3227
|
};
|
|
3228
|
-
module.exports =
|
|
3228
|
+
module.exports = parse2;
|
|
3229
3229
|
}
|
|
3230
3230
|
});
|
|
3231
3231
|
|
|
@@ -3236,7 +3236,7 @@ var require_picomatch = __commonJS({
|
|
|
3236
3236
|
init_utils();
|
|
3237
3237
|
var path = __require("path");
|
|
3238
3238
|
var scan = require_scan();
|
|
3239
|
-
var
|
|
3239
|
+
var parse2 = require_parse2();
|
|
3240
3240
|
var utils = require_utils2();
|
|
3241
3241
|
var constants2 = require_constants2();
|
|
3242
3242
|
var isObject = (val) => val && typeof val === "object" && !Array.isArray(val);
|
|
@@ -3324,7 +3324,7 @@ var require_picomatch = __commonJS({
|
|
|
3324
3324
|
picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
|
|
3325
3325
|
picomatch.parse = (pattern, options) => {
|
|
3326
3326
|
if (Array.isArray(pattern)) return pattern.map((p) => picomatch.parse(p, options));
|
|
3327
|
-
return
|
|
3327
|
+
return parse2(pattern, { ...options, fastpaths: false });
|
|
3328
3328
|
};
|
|
3329
3329
|
picomatch.scan = (input, options) => scan(input, options);
|
|
3330
3330
|
picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => {
|
|
@@ -3350,10 +3350,10 @@ var require_picomatch = __commonJS({
|
|
|
3350
3350
|
}
|
|
3351
3351
|
let parsed = { negated: false, fastpaths: true };
|
|
3352
3352
|
if (options.fastpaths !== false && (input[0] === "." || input[0] === "*")) {
|
|
3353
|
-
parsed.output =
|
|
3353
|
+
parsed.output = parse2.fastpaths(input, options);
|
|
3354
3354
|
}
|
|
3355
3355
|
if (!parsed.output) {
|
|
3356
|
-
parsed =
|
|
3356
|
+
parsed = parse2(input, options);
|
|
3357
3357
|
}
|
|
3358
3358
|
return picomatch.compileRe(parsed, options, returnOutput, returnState);
|
|
3359
3359
|
};
|
|
@@ -7215,11 +7215,39 @@ var init_PathResolver = __esm({
|
|
|
7215
7215
|
});
|
|
7216
7216
|
|
|
7217
7217
|
// packages/tooling/src/utils/errors.ts
|
|
7218
|
-
var DoNotDevError;
|
|
7218
|
+
var DO_NOT_DEV_ERROR_CODES, DoNotDevError;
|
|
7219
7219
|
var init_errors = __esm({
|
|
7220
7220
|
"packages/tooling/src/utils/errors.ts"() {
|
|
7221
7221
|
"use strict";
|
|
7222
7222
|
init_utils();
|
|
7223
|
+
DO_NOT_DEV_ERROR_CODES = {
|
|
7224
|
+
CONFIGURATION_ERROR: "configuration-error",
|
|
7225
|
+
CONFIG_NOT_FOUND: "config-not-found",
|
|
7226
|
+
CONFIG_INVALID: "config-invalid",
|
|
7227
|
+
PATH_RESOLUTION_ERROR: "path-resolution-error",
|
|
7228
|
+
FILE_OPERATION_ERROR: "file-operation-error",
|
|
7229
|
+
FILE_NOT_FOUND: "file-not-found",
|
|
7230
|
+
PERMISSION_DENIED: "permission-denied",
|
|
7231
|
+
GENERATION_ERROR: "generation-error",
|
|
7232
|
+
TEMPLATE_ERROR: "template-error",
|
|
7233
|
+
TEMPLATE_NOT_FOUND: "template-not-found",
|
|
7234
|
+
CLI_EXECUTION_ERROR: "cli-execution-error",
|
|
7235
|
+
COMMAND_NOT_FOUND: "command-not-found",
|
|
7236
|
+
COMMAND_FAILED: "command-failed",
|
|
7237
|
+
VALIDATION_ERROR: "validation-error",
|
|
7238
|
+
SCHEMA_ERROR: "schema-error",
|
|
7239
|
+
DEPENDENCY_ERROR: "dependency-error",
|
|
7240
|
+
DEPENDENCY_NOT_FOUND: "dependency-not-found",
|
|
7241
|
+
DEPENDENCY_VERSION_ERROR: "dependency-version-error",
|
|
7242
|
+
INVALID_ARGUMENT: "invalid-argument",
|
|
7243
|
+
MISSING_ARGUMENT: "missing-argument",
|
|
7244
|
+
MISSING_PROJECT_ID: "missing-project-id",
|
|
7245
|
+
FIREBASE_CLI_ERROR: "firebase-cli-error",
|
|
7246
|
+
DEPLOYMENT_FAILED: "deployment-failed",
|
|
7247
|
+
OPERATION_CANCELLED: "operation-cancelled",
|
|
7248
|
+
TIMEOUT_ERROR: "timeout-error",
|
|
7249
|
+
UNKNOWN_ERROR: "unknown-error"
|
|
7250
|
+
};
|
|
7223
7251
|
DoNotDevError = class _DoNotDevError extends Error {
|
|
7224
7252
|
/** The error code categorizing this error */
|
|
7225
7253
|
code;
|
|
@@ -7239,7 +7267,7 @@ var init_errors = __esm({
|
|
|
7239
7267
|
* @param {Record<string, any>} [options.context] - Additional context data
|
|
7240
7268
|
* @param {boolean} [options.displayable=true] - Whether this error should be displayed to the user
|
|
7241
7269
|
*/
|
|
7242
|
-
constructor(message, code =
|
|
7270
|
+
constructor(message, code = DO_NOT_DEV_ERROR_CODES.UNKNOWN_ERROR, options) {
|
|
7243
7271
|
super(message);
|
|
7244
7272
|
this.name = "DoNotDevError";
|
|
7245
7273
|
this.code = code;
|
|
@@ -7270,7 +7298,7 @@ var init_errors = __esm({
|
|
|
7270
7298
|
* @param {boolean} [options.displayable=true] - Whether this error should be displayed to the user
|
|
7271
7299
|
* @returns {DoNotDevError} New DoNotDev error wrapping the original
|
|
7272
7300
|
*/
|
|
7273
|
-
static from(error2, context, code =
|
|
7301
|
+
static from(error2, context, code = DO_NOT_DEV_ERROR_CODES.UNKNOWN_ERROR, options) {
|
|
7274
7302
|
if (!(error2 instanceof Error)) {
|
|
7275
7303
|
return new _DoNotDevError(
|
|
7276
7304
|
`Unknown error: ${String(error2)}`,
|
|
@@ -7307,21 +7335,21 @@ var init_errors = __esm({
|
|
|
7307
7335
|
}
|
|
7308
7336
|
const message = error2.message.toLowerCase();
|
|
7309
7337
|
if (error2.name === "ValidationError" || message.includes("validation")) {
|
|
7310
|
-
return
|
|
7338
|
+
return DO_NOT_DEV_ERROR_CODES.VALIDATION_ERROR;
|
|
7311
7339
|
}
|
|
7312
7340
|
if (message.includes("not found") || message.includes("no such file")) {
|
|
7313
|
-
return
|
|
7341
|
+
return DO_NOT_DEV_ERROR_CODES.FILE_NOT_FOUND;
|
|
7314
7342
|
}
|
|
7315
7343
|
if (message.includes("permission") || message.includes("access denied")) {
|
|
7316
|
-
return
|
|
7344
|
+
return DO_NOT_DEV_ERROR_CODES.PERMISSION_DENIED;
|
|
7317
7345
|
}
|
|
7318
7346
|
if (message.includes("timeout") || message.includes("timed out")) {
|
|
7319
|
-
return
|
|
7347
|
+
return DO_NOT_DEV_ERROR_CODES.TIMEOUT_ERROR;
|
|
7320
7348
|
}
|
|
7321
7349
|
if (message.includes("dependency") || message.includes("module not found")) {
|
|
7322
|
-
return
|
|
7350
|
+
return DO_NOT_DEV_ERROR_CODES.DEPENDENCY_ERROR;
|
|
7323
7351
|
}
|
|
7324
|
-
return
|
|
7352
|
+
return DO_NOT_DEV_ERROR_CODES.UNKNOWN_ERROR;
|
|
7325
7353
|
}
|
|
7326
7354
|
};
|
|
7327
7355
|
}
|
|
@@ -7336,6 +7364,7 @@ import {
|
|
|
7336
7364
|
extname as extname2,
|
|
7337
7365
|
relative as relative2,
|
|
7338
7366
|
resolve as resolve2,
|
|
7367
|
+
parse,
|
|
7339
7368
|
isAbsolute as pathIsAbsolute
|
|
7340
7369
|
} from "node:path";
|
|
7341
7370
|
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
@@ -1596,7 +1596,7 @@ var require_parse = __commonJS({
|
|
|
1596
1596
|
CHAR_NO_BREAK_SPACE,
|
|
1597
1597
|
CHAR_ZERO_WIDTH_NOBREAK_SPACE
|
|
1598
1598
|
} = require_constants();
|
|
1599
|
-
var
|
|
1599
|
+
var parse2 = (input, options = {}) => {
|
|
1600
1600
|
if (typeof input !== "string") {
|
|
1601
1601
|
throw new TypeError("Expected a string");
|
|
1602
1602
|
}
|
|
@@ -1796,7 +1796,7 @@ var require_parse = __commonJS({
|
|
|
1796
1796
|
push({ type: "eos" });
|
|
1797
1797
|
return ast;
|
|
1798
1798
|
};
|
|
1799
|
-
module.exports =
|
|
1799
|
+
module.exports = parse2;
|
|
1800
1800
|
}
|
|
1801
1801
|
});
|
|
1802
1802
|
|
|
@@ -1808,7 +1808,7 @@ var require_braces = __commonJS({
|
|
|
1808
1808
|
var stringify2 = require_stringify();
|
|
1809
1809
|
var compile = require_compile();
|
|
1810
1810
|
var expand = require_expand();
|
|
1811
|
-
var
|
|
1811
|
+
var parse2 = require_parse();
|
|
1812
1812
|
var braces = (input, options = {}) => {
|
|
1813
1813
|
let output = [];
|
|
1814
1814
|
if (Array.isArray(input)) {
|
|
@@ -1828,7 +1828,7 @@ var require_braces = __commonJS({
|
|
|
1828
1828
|
}
|
|
1829
1829
|
return output;
|
|
1830
1830
|
};
|
|
1831
|
-
braces.parse = (input, options = {}) =>
|
|
1831
|
+
braces.parse = (input, options = {}) => parse2(input, options);
|
|
1832
1832
|
braces.stringify = (input, options = {}) => {
|
|
1833
1833
|
if (typeof input === "string") {
|
|
1834
1834
|
return stringify2(braces.parse(input, options), options);
|
|
@@ -2485,7 +2485,7 @@ var require_parse2 = __commonJS({
|
|
|
2485
2485
|
var syntaxError = (type, char) => {
|
|
2486
2486
|
return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
|
|
2487
2487
|
};
|
|
2488
|
-
var
|
|
2488
|
+
var parse2 = (input, options) => {
|
|
2489
2489
|
if (typeof input !== "string") {
|
|
2490
2490
|
throw new TypeError("Expected a string");
|
|
2491
2491
|
}
|
|
@@ -2634,7 +2634,7 @@ var require_parse2 = __commonJS({
|
|
|
2634
2634
|
output = token.close = `)$))${extglobStar}`;
|
|
2635
2635
|
}
|
|
2636
2636
|
if (token.inner.includes("*") && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) {
|
|
2637
|
-
const expression =
|
|
2637
|
+
const expression = parse2(rest, { ...options, fastpaths: false }).output;
|
|
2638
2638
|
output = token.close = `)${expression})${extglobStar})`;
|
|
2639
2639
|
}
|
|
2640
2640
|
if (token.prev.type === "bos") {
|
|
@@ -3159,7 +3159,7 @@ var require_parse2 = __commonJS({
|
|
|
3159
3159
|
}
|
|
3160
3160
|
return state;
|
|
3161
3161
|
};
|
|
3162
|
-
|
|
3162
|
+
parse2.fastpaths = (input, options) => {
|
|
3163
3163
|
const opts = { ...options };
|
|
3164
3164
|
const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
|
|
3165
3165
|
const len = input.length;
|
|
@@ -3225,7 +3225,7 @@ var require_parse2 = __commonJS({
|
|
|
3225
3225
|
}
|
|
3226
3226
|
return source;
|
|
3227
3227
|
};
|
|
3228
|
-
module.exports =
|
|
3228
|
+
module.exports = parse2;
|
|
3229
3229
|
}
|
|
3230
3230
|
});
|
|
3231
3231
|
|
|
@@ -3236,7 +3236,7 @@ var require_picomatch = __commonJS({
|
|
|
3236
3236
|
init_utils();
|
|
3237
3237
|
var path = __require("path");
|
|
3238
3238
|
var scan = require_scan();
|
|
3239
|
-
var
|
|
3239
|
+
var parse2 = require_parse2();
|
|
3240
3240
|
var utils = require_utils2();
|
|
3241
3241
|
var constants2 = require_constants2();
|
|
3242
3242
|
var isObject = (val) => val && typeof val === "object" && !Array.isArray(val);
|
|
@@ -3324,7 +3324,7 @@ var require_picomatch = __commonJS({
|
|
|
3324
3324
|
picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
|
|
3325
3325
|
picomatch.parse = (pattern, options) => {
|
|
3326
3326
|
if (Array.isArray(pattern)) return pattern.map((p) => picomatch.parse(p, options));
|
|
3327
|
-
return
|
|
3327
|
+
return parse2(pattern, { ...options, fastpaths: false });
|
|
3328
3328
|
};
|
|
3329
3329
|
picomatch.scan = (input, options) => scan(input, options);
|
|
3330
3330
|
picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => {
|
|
@@ -3350,10 +3350,10 @@ var require_picomatch = __commonJS({
|
|
|
3350
3350
|
}
|
|
3351
3351
|
let parsed = { negated: false, fastpaths: true };
|
|
3352
3352
|
if (options.fastpaths !== false && (input[0] === "." || input[0] === "*")) {
|
|
3353
|
-
parsed.output =
|
|
3353
|
+
parsed.output = parse2.fastpaths(input, options);
|
|
3354
3354
|
}
|
|
3355
3355
|
if (!parsed.output) {
|
|
3356
|
-
parsed =
|
|
3356
|
+
parsed = parse2(input, options);
|
|
3357
3357
|
}
|
|
3358
3358
|
return picomatch.compileRe(parsed, options, returnOutput, returnState);
|
|
3359
3359
|
};
|
|
@@ -7215,11 +7215,39 @@ var init_PathResolver = __esm({
|
|
|
7215
7215
|
});
|
|
7216
7216
|
|
|
7217
7217
|
// packages/tooling/src/utils/errors.ts
|
|
7218
|
-
var DoNotDevError;
|
|
7218
|
+
var DO_NOT_DEV_ERROR_CODES, DoNotDevError;
|
|
7219
7219
|
var init_errors = __esm({
|
|
7220
7220
|
"packages/tooling/src/utils/errors.ts"() {
|
|
7221
7221
|
"use strict";
|
|
7222
7222
|
init_utils();
|
|
7223
|
+
DO_NOT_DEV_ERROR_CODES = {
|
|
7224
|
+
CONFIGURATION_ERROR: "configuration-error",
|
|
7225
|
+
CONFIG_NOT_FOUND: "config-not-found",
|
|
7226
|
+
CONFIG_INVALID: "config-invalid",
|
|
7227
|
+
PATH_RESOLUTION_ERROR: "path-resolution-error",
|
|
7228
|
+
FILE_OPERATION_ERROR: "file-operation-error",
|
|
7229
|
+
FILE_NOT_FOUND: "file-not-found",
|
|
7230
|
+
PERMISSION_DENIED: "permission-denied",
|
|
7231
|
+
GENERATION_ERROR: "generation-error",
|
|
7232
|
+
TEMPLATE_ERROR: "template-error",
|
|
7233
|
+
TEMPLATE_NOT_FOUND: "template-not-found",
|
|
7234
|
+
CLI_EXECUTION_ERROR: "cli-execution-error",
|
|
7235
|
+
COMMAND_NOT_FOUND: "command-not-found",
|
|
7236
|
+
COMMAND_FAILED: "command-failed",
|
|
7237
|
+
VALIDATION_ERROR: "validation-error",
|
|
7238
|
+
SCHEMA_ERROR: "schema-error",
|
|
7239
|
+
DEPENDENCY_ERROR: "dependency-error",
|
|
7240
|
+
DEPENDENCY_NOT_FOUND: "dependency-not-found",
|
|
7241
|
+
DEPENDENCY_VERSION_ERROR: "dependency-version-error",
|
|
7242
|
+
INVALID_ARGUMENT: "invalid-argument",
|
|
7243
|
+
MISSING_ARGUMENT: "missing-argument",
|
|
7244
|
+
MISSING_PROJECT_ID: "missing-project-id",
|
|
7245
|
+
FIREBASE_CLI_ERROR: "firebase-cli-error",
|
|
7246
|
+
DEPLOYMENT_FAILED: "deployment-failed",
|
|
7247
|
+
OPERATION_CANCELLED: "operation-cancelled",
|
|
7248
|
+
TIMEOUT_ERROR: "timeout-error",
|
|
7249
|
+
UNKNOWN_ERROR: "unknown-error"
|
|
7250
|
+
};
|
|
7223
7251
|
DoNotDevError = class _DoNotDevError extends Error {
|
|
7224
7252
|
/** The error code categorizing this error */
|
|
7225
7253
|
code;
|
|
@@ -7239,7 +7267,7 @@ var init_errors = __esm({
|
|
|
7239
7267
|
* @param {Record<string, any>} [options.context] - Additional context data
|
|
7240
7268
|
* @param {boolean} [options.displayable=true] - Whether this error should be displayed to the user
|
|
7241
7269
|
*/
|
|
7242
|
-
constructor(message, code =
|
|
7270
|
+
constructor(message, code = DO_NOT_DEV_ERROR_CODES.UNKNOWN_ERROR, options) {
|
|
7243
7271
|
super(message);
|
|
7244
7272
|
this.name = "DoNotDevError";
|
|
7245
7273
|
this.code = code;
|
|
@@ -7270,7 +7298,7 @@ var init_errors = __esm({
|
|
|
7270
7298
|
* @param {boolean} [options.displayable=true] - Whether this error should be displayed to the user
|
|
7271
7299
|
* @returns {DoNotDevError} New DoNotDev error wrapping the original
|
|
7272
7300
|
*/
|
|
7273
|
-
static from(error2, context, code =
|
|
7301
|
+
static from(error2, context, code = DO_NOT_DEV_ERROR_CODES.UNKNOWN_ERROR, options) {
|
|
7274
7302
|
if (!(error2 instanceof Error)) {
|
|
7275
7303
|
return new _DoNotDevError(
|
|
7276
7304
|
`Unknown error: ${String(error2)}`,
|
|
@@ -7307,21 +7335,21 @@ var init_errors = __esm({
|
|
|
7307
7335
|
}
|
|
7308
7336
|
const message = error2.message.toLowerCase();
|
|
7309
7337
|
if (error2.name === "ValidationError" || message.includes("validation")) {
|
|
7310
|
-
return
|
|
7338
|
+
return DO_NOT_DEV_ERROR_CODES.VALIDATION_ERROR;
|
|
7311
7339
|
}
|
|
7312
7340
|
if (message.includes("not found") || message.includes("no such file")) {
|
|
7313
|
-
return
|
|
7341
|
+
return DO_NOT_DEV_ERROR_CODES.FILE_NOT_FOUND;
|
|
7314
7342
|
}
|
|
7315
7343
|
if (message.includes("permission") || message.includes("access denied")) {
|
|
7316
|
-
return
|
|
7344
|
+
return DO_NOT_DEV_ERROR_CODES.PERMISSION_DENIED;
|
|
7317
7345
|
}
|
|
7318
7346
|
if (message.includes("timeout") || message.includes("timed out")) {
|
|
7319
|
-
return
|
|
7347
|
+
return DO_NOT_DEV_ERROR_CODES.TIMEOUT_ERROR;
|
|
7320
7348
|
}
|
|
7321
7349
|
if (message.includes("dependency") || message.includes("module not found")) {
|
|
7322
|
-
return
|
|
7350
|
+
return DO_NOT_DEV_ERROR_CODES.DEPENDENCY_ERROR;
|
|
7323
7351
|
}
|
|
7324
|
-
return
|
|
7352
|
+
return DO_NOT_DEV_ERROR_CODES.UNKNOWN_ERROR;
|
|
7325
7353
|
}
|
|
7326
7354
|
};
|
|
7327
7355
|
}
|
|
@@ -7336,6 +7364,7 @@ import {
|
|
|
7336
7364
|
extname as extname2,
|
|
7337
7365
|
relative as relative2,
|
|
7338
7366
|
resolve as resolve2,
|
|
7367
|
+
parse,
|
|
7339
7368
|
isAbsolute as pathIsAbsolute
|
|
7340
7369
|
} from "node:path";
|
|
7341
7370
|
import { fileURLToPath as fileURLToPath2 } from "node:url";
|