Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const fs_extra_1 = __importDefault(require("fs-extra"));
const fast_glob_1 = __importDefault(require("fast-glob"));
const semver_1 = __importDefault(require("semver"));
const core_1 = require("@beemo/core");
class ConvertChangelogScript extends core_1.Script {
blueprint() {
return {};
}
async execute(context) {
const files = await fast_glob_1.default('**/CHANGELOG.md', {
absolute: true,
cwd: context.cwd.path(),
ignore: ['node_modules'],
});
return Promise.all(files.map(filePath => this.convertChangelog(filePath)));
}
async convertChangelog(filePath) {
const data = [];
let lastVersion = '0.0.0';
(await fs_extra_1.default.readFile(filePath, 'utf8'))
.split('\n')
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const execa_1 = __importDefault(require("execa"));
const core_1 = require("@beemo/core");
class BuildScript extends core_1.Script {
constructor() {
super(...arguments);
Object.defineProperty(this, "workspaceArgs", {
enumerable: true,
configurable: true,
writable: true,
value: []
});
}
args() {
return {
string: ['workspaces'],
default: {
workspaces: '',
},
};
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const fs_extra_1 = __importDefault(require("fs-extra"));
const fast_glob_1 = __importDefault(require("fast-glob"));
const core_1 = require("@beemo/core");
class AddFundingScript extends core_1.Script {
args() {
return {};
}
blueprint() {
return {};
}
bootstrap() {
this.task('Add funding to all package.json', this.addFundingToPackages);
}
addFundingToPackages(context) {
return fast_glob_1.default('**/package.json', {
absolute: true,
cwd: context.cwd.path(),
ignore: ['**/node_modules'],
}).then(pkgPaths => pkgPaths.map(pkgPath => {
const pkg = fs_extra_1.default.readJsonSync(pkgPath);
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const fs_extra_1 = __importDefault(require("fs-extra"));
const core_1 = require("@beemo/core");
const constants_1 = require("../constants");
class InitScript extends core_1.Script {
args() {
return {
boolean: ['local', 'node', 'react', 'workspaces'],
default: {
local: false,
node: false,
react: false,
workspaces: false,
},
};
}
blueprint() {
return {};
}
execute(context, args) {
var _a;