HEX
Server: nginx/1.18.0
System: Linux test-ipsremont 5.4.0-214-generic #234-Ubuntu SMP Fri Mar 14 23:50:27 UTC 2025 x86_64
User: ips (1000)
PHP: 8.0.30
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/quadcode/one-time-popup/node_modules/sass-embedded/dist/tool/prepare-release.js
"use strict";
// Copyright 2021 Google Inc. Use of this source code is governed by an
// MIT-style license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.
Object.defineProperty(exports, "__esModule", { value: true });
const fs_1 = require("fs");
const shell = require("shelljs");
const pkg = require("../package.json");
const get_deprecations_1 = require("./get-deprecations");
const get_language_repo_1 = require("./get-language-repo");
void (async () => {
    try {
        await sanityCheckBeforeRelease();
        await (0, get_language_repo_1.getLanguageRepo)('lib/src/vendor');
        await (0, get_deprecations_1.getDeprecations)('lib/src/vendor');
        console.log('Transpiling TS into dist.');
        shell.exec('tsc -p tsconfig.build.json');
        shell.cp('lib/index.mjs', 'dist/lib/index.mjs');
        console.log('Copying JS API types to dist.');
        shell.cp('-R', 'lib/src/vendor/sass', 'dist/types');
        shell.cp('dist/types/index.d.ts', 'dist/types/index.m.d.ts');
        await fs_1.promises.unlink('dist/types/README.md');
        console.log('Ready for publishing to npm.');
    }
    catch (error) {
        console.error(error);
        process.exitCode = 1;
    }
})();
// Quick sanity checks to make sure the release we are preparing is a suitable
// candidate for release.
async function sanityCheckBeforeRelease() {
    console.log('Running sanity checks before releasing.');
    const releaseVersion = pkg.version;
    const ref = process.env['GITHUB_REF'];
    if (ref !== `refs/tags/${releaseVersion}`) {
        throw Error(`GITHUB_REF ${ref} is different than the package.json version ${releaseVersion}.`);
    }
    for (const [dep, version] of Object.entries(pkg.optionalDependencies)) {
        if (version !== releaseVersion) {
            throw Error(`optional dependency ${dep}'s version doesn't match ${releaseVersion}.`);
        }
    }
    if (releaseVersion.indexOf('-dev') > 0) {
        throw Error(`${releaseVersion} is a dev release.`);
    }
    const versionHeader = new RegExp(`^## ${releaseVersion}$`, 'm');
    const changelog = await fs_1.promises.readFile('CHANGELOG.md', 'utf8');
    if (!changelog.match(versionHeader)) {
        throw Error(`There's no CHANGELOG entry for ${releaseVersion}.`);
    }
}
//# sourceMappingURL=prepare-release.js.map