"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.resolveDefaultNodeEnv = void 0;
/**
 * Picks a default NODE_ENV when the CLI is launched without one.
 * npm-installed copies live under .../node_modules/rivet-design/ (production).
 * Linked or repo-local runs resolve to a path without that segment (development).
 */
const resolveDefaultNodeEnv = (packageRootAbsolutePath, packageName) => {
    if (packageName !== 'rivet-design') {
        return 'development';
    }
    const normalized = packageRootAbsolutePath.replace(/\\/g, '/');
    const isPublishedLayout = /(?:^|\/)node_modules\/rivet-design(?:\/|$)/.test(normalized);
    return isPublishedLayout ? 'production' : 'development';
};
exports.resolveDefaultNodeEnv = resolveDefaultNodeEnv;
//# sourceMappingURL=resolveDefaultNodeEnv.js.map