rearrage_stuff
This commit is contained in:
54
node_modules/sass-embedded/dist/tool/get-deprecations.js
generated
vendored
Normal file
54
node_modules/sass-embedded/dist/tool/get-deprecations.js
generated
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
"use strict";
|
||||
// Generates the list of deprecations from spec/deprecations.yaml in the
|
||||
// language repo.
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.getDeprecations = getDeprecations;
|
||||
const fs = require("fs");
|
||||
const yaml_1 = require("yaml");
|
||||
const yamlFile = 'build/sass/spec/deprecations.yaml';
|
||||
/**
|
||||
* Converts a version string in the form X.Y.Z to be code calling the Version
|
||||
* constructor, or null if the string is undefined.
|
||||
*/
|
||||
function toVersionCode(version) {
|
||||
if (!version)
|
||||
return 'null';
|
||||
const match = version.match(/^(\d+)\.(\d+)\.(\d+)$/);
|
||||
if (match === null) {
|
||||
throw new Error(`Invalid version ${version}`);
|
||||
}
|
||||
return `new Version(${match[1]}, ${match[2]}, ${match[3]})`;
|
||||
}
|
||||
/**
|
||||
* Generates the list of deprecations based on the YAML file in the language
|
||||
* repo.
|
||||
*/
|
||||
async function getDeprecations(outDirectory) {
|
||||
const yamlText = fs.readFileSync(yamlFile, 'utf8');
|
||||
const deprecations = (0, yaml_1.parse)(yamlText);
|
||||
let tsText = "import {Deprecations} from './sass';\n" +
|
||||
"import {Version} from '../version';\n\n" +
|
||||
'export const deprecations: Deprecations = {\n';
|
||||
for (const [id, deprecation] of Object.entries(deprecations)) {
|
||||
const key = id.includes('-') ? `'${id}'` : id;
|
||||
const dartSass = deprecation['dart-sass'];
|
||||
tsText +=
|
||||
` ${key}: {\n` +
|
||||
` id: '${id}',\n` +
|
||||
` description: '${deprecation.description}',\n` +
|
||||
` status: '${dartSass.status}',\n` +
|
||||
` deprecatedIn: ${toVersionCode(dartSass.deprecated)},\n` +
|
||||
` obsoleteIn: ${toVersionCode(dartSass.obsolete)},\n` +
|
||||
' },\n';
|
||||
}
|
||||
tsText +=
|
||||
" 'user-authored': {\n" +
|
||||
" id: 'user-authored',\n" +
|
||||
" status: 'user',\n" +
|
||||
' deprecatedIn: null,\n' +
|
||||
' obsoleteIn: null,\n' +
|
||||
' },\n' +
|
||||
'}\n';
|
||||
fs.writeFileSync(`${outDirectory}/deprecations.ts`, tsText);
|
||||
}
|
||||
//# sourceMappingURL=get-deprecations.js.map
|
||||
1
node_modules/sass-embedded/dist/tool/get-deprecations.js.map
generated
vendored
Normal file
1
node_modules/sass-embedded/dist/tool/get-deprecations.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"get-deprecations.js","sourceRoot":"","sources":["../../tool/get-deprecations.ts"],"names":[],"mappings":";AAAA,wEAAwE;AACxE,iBAAiB;;AAmCjB,0CA8BC;AA/DD,yBAAyB;AACzB,+BAA2B;AAa3B,MAAM,QAAQ,GAAG,mCAAmC,CAAC;AAErD;;;GAGG;AACH,SAAS,aAAa,CAAC,OAA2B;IAChD,IAAI,CAAC,OAAO;QAAE,OAAO,MAAM,CAAC;IAC5B,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC;IACrD,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QACnB,MAAM,IAAI,KAAK,CAAC,mBAAmB,OAAO,EAAE,CAAC,CAAC;IAChD,CAAC;IACD,OAAO,eAAe,KAAK,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC;AAC9D,CAAC;AAED;;;GAGG;AACI,KAAK,UAAU,eAAe,CAAC,YAAoB;IACxD,MAAM,QAAQ,GAAG,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IAEnD,MAAM,YAAY,GAAG,IAAA,YAAK,EAAC,QAAQ,CAAa,CAAC;IACjD,IAAI,MAAM,GACR,wCAAwC;QACxC,yCAAyC;QACzC,+CAA+C,CAAC;IAClD,KAAK,MAAM,CAAC,EAAE,EAAE,WAAW,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC;QAC7D,MAAM,GAAG,GAAG,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;QAC9C,MAAM,QAAQ,GAAG,WAAW,CAAC,WAAW,CAAC,CAAC;QAC1C,MAAM;YACJ,KAAK,GAAG,OAAO;gBACf,YAAY,EAAE,MAAM;gBACpB,qBAAqB,WAAW,CAAC,WAAW,MAAM;gBAClD,gBAAgB,QAAQ,CAAC,MAAM,MAAM;gBACrC,qBAAqB,aAAa,CAAC,QAAQ,CAAC,UAAU,CAAC,KAAK;gBAC5D,mBAAmB,aAAa,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK;gBACxD,QAAQ,CAAC;IACb,CAAC;IACD,MAAM;QACJ,wBAAwB;YACxB,4BAA4B;YAC5B,uBAAuB;YACvB,2BAA2B;YAC3B,yBAAyB;YACzB,QAAQ;YACR,KAAK,CAAC;IAER,EAAE,CAAC,aAAa,CAAC,GAAG,YAAY,kBAAkB,EAAE,MAAM,CAAC,CAAC;AAC9D,CAAC"}
|
||||
83
node_modules/sass-embedded/dist/tool/get-embedded-compiler.js
generated
vendored
Normal file
83
node_modules/sass-embedded/dist/tool/get-embedded-compiler.js
generated
vendored
Normal file
@@ -0,0 +1,83 @@
|
||||
"use strict";
|
||||
// Copyright 2022 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 });
|
||||
exports.getEmbeddedCompiler = getEmbeddedCompiler;
|
||||
const fs_1 = require("fs");
|
||||
const p = require("path");
|
||||
const shell = require("shelljs");
|
||||
const compiler_module_1 = require("../lib/src/compiler-module");
|
||||
const utils = require("./utils");
|
||||
/**
|
||||
* Downloads and builds the Embedded Dart Sass compiler.
|
||||
*
|
||||
* Can check out and build the source from a Git `ref` or build from the source
|
||||
* at `path`. By default, checks out the latest revision from GitHub.
|
||||
*
|
||||
* The embedded compiler will be built as dart snapshot by default, or pure node
|
||||
* js if the `js` option is `true`.
|
||||
*/
|
||||
async function getEmbeddedCompiler(options) {
|
||||
const repo = 'dart-sass';
|
||||
let source;
|
||||
if (options !== undefined && 'path' in options) {
|
||||
source = options.path;
|
||||
}
|
||||
else {
|
||||
utils.fetchRepo({
|
||||
repo,
|
||||
outPath: 'build',
|
||||
ref: options?.ref ?? 'main',
|
||||
});
|
||||
source = p.join('build', repo);
|
||||
}
|
||||
// Make sure the compiler sees the same version of the language repo that the
|
||||
// host is using, but if they're already the same directory (as in the Dart
|
||||
// Sass CI environment) we don't need to do anything.
|
||||
const languageInHost = p.resolve('build/sass');
|
||||
const languageInCompiler = p.resolve(p.join(source, 'build/language'));
|
||||
if (!(await utils.sameTarget(languageInHost, languageInCompiler))) {
|
||||
await utils.cleanDir(languageInCompiler);
|
||||
await utils.link(languageInHost, languageInCompiler);
|
||||
}
|
||||
const js = options?.js ?? false;
|
||||
buildDartSassEmbedded(source, js);
|
||||
const jsModulePath = p.resolve('node_modules/sass');
|
||||
const dartModulePath = p.resolve(p.join('node_modules', compiler_module_1.compilerModule));
|
||||
if (js) {
|
||||
await fs_1.promises.rm(dartModulePath, { force: true, recursive: true });
|
||||
await utils.link(p.join(source, 'build/npm'), jsModulePath);
|
||||
}
|
||||
else {
|
||||
await fs_1.promises.rm(jsModulePath, { force: true, recursive: true });
|
||||
await utils.link(p.join(source, 'build'), p.join(dartModulePath, repo));
|
||||
}
|
||||
}
|
||||
// Builds the Embedded Dart Sass executable from the source at `repoPath`.
|
||||
function buildDartSassEmbedded(repoPath, js) {
|
||||
console.log("Downloading Dart Sass's dependencies.");
|
||||
shell.exec('dart pub upgrade', {
|
||||
cwd: repoPath,
|
||||
silent: true,
|
||||
});
|
||||
if (js) {
|
||||
shell.exec('npm install', {
|
||||
cwd: repoPath,
|
||||
silent: true,
|
||||
});
|
||||
console.log('Building the Dart Sass npm package.');
|
||||
shell.exec('dart run grinder protobuf pkg-npm-dev', {
|
||||
cwd: repoPath,
|
||||
env: { ...process.env, UPDATE_SASS_PROTOCOL: 'false' },
|
||||
});
|
||||
}
|
||||
else {
|
||||
console.log('Building the Dart Sass executable.');
|
||||
shell.exec('dart run grinder protobuf pkg-standalone-dev', {
|
||||
cwd: repoPath,
|
||||
env: { ...process.env, UPDATE_SASS_PROTOCOL: 'false' },
|
||||
});
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=get-embedded-compiler.js.map
|
||||
1
node_modules/sass-embedded/dist/tool/get-embedded-compiler.js.map
generated
vendored
Normal file
1
node_modules/sass-embedded/dist/tool/get-embedded-compiler.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"get-embedded-compiler.js","sourceRoot":"","sources":["../../tool/get-embedded-compiler.ts"],"names":[],"mappings":";AAAA,uEAAuE;AACvE,gEAAgE;AAChE,uCAAuC;;AAkBvC,kDA+CC;AA/DD,2BAAkC;AAClC,0BAA0B;AAC1B,iCAAiC;AAEjC,gEAA0D;AAC1D,iCAAiC;AAEjC;;;;;;;;GAQG;AACI,KAAK,UAAU,mBAAmB,CACvC,OAQK;IAEL,MAAM,IAAI,GAAG,WAAW,CAAC;IAEzB,IAAI,MAAc,CAAC;IACnB,IAAI,OAAO,KAAK,SAAS,IAAI,MAAM,IAAI,OAAO,EAAE,CAAC;QAC/C,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IACxB,CAAC;SAAM,CAAC;QACN,KAAK,CAAC,SAAS,CAAC;YACd,IAAI;YACJ,OAAO,EAAE,OAAO;YAChB,GAAG,EAAE,OAAO,EAAE,GAAG,IAAI,MAAM;SAC5B,CAAC,CAAC;QACH,MAAM,GAAG,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IACjC,CAAC;IAED,6EAA6E;IAC7E,2EAA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AAc,EAAE,IAAI,CAAC,CAAC,CAAC;IAC1E,CAAC;AACH,CAAC;AAED,0EAA0E;AAC1E,SAAS,qBAAqB,CAAC,QAAgB,EAAE,EAAW;IAC1D,OAAO,CAAC,GAAG,CAAC,uCAAuC,CAAC,CAAC;IACrD,KAAK,CAAC,IAAI,CAAC,kBAAkB,EAAE;QAC7B,GAAG,EAAE,QAAQ;QACb,MAAM,EAAE,IAAI;KACb,CAAC,CAAC;IAEH,IAAI,EAAE,EAAE,CAAC;QACP,KAAK,CAAC,IAAI,CAAC,aAAa,EAAE;YACxB,GAAG,EAAE,QAAQ;YACb,MAAM,EAAE,IAAI;SACb,CAAC,CAAC;QAEH,OAAO,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAC;QACnD,KAAK,CAAC,IAAI,CAAC,uCAAuC,EAAE;YAClD,GAAG,EAAE,QAAQ;YACb,GAAG,EAAE,EAAC,GAAG,OAAO,CAAC,GAAG,EAAE,oBAAoB,EAAE,OAAO,EAAC;SACrD,CAAC,CAAC;IACL,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,oCAAoC,CAAC,CAAC;QAClD,KAAK,CAAC,IAAI,CAAC,8CAA8C,EAAE;YACzD,GAAG,EAAE,QAAQ;YACb,GAAG,EAAE,EAAC,GAAG,OAAO,CAAC,GAAG,EAAE,oBAAoB,EAAE,OAAO,EAAC;SACrD,CAAC,CAAC;IACL,CAAC;AACH,CAAC"}
|
||||
43
node_modules/sass-embedded/dist/tool/get-language-repo.js
generated
vendored
Normal file
43
node_modules/sass-embedded/dist/tool/get-language-repo.js
generated
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
"use strict";
|
||||
// Copyright 2022 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 });
|
||||
exports.getLanguageRepo = getLanguageRepo;
|
||||
const p = require("path");
|
||||
const shell = require("shelljs");
|
||||
const utils = require("./utils");
|
||||
/**
|
||||
* Downloads the Sass language repo and buids the Embedded Sass protocol
|
||||
* definition.
|
||||
*
|
||||
* Can check out and build the source from a Git `ref` or build from the source
|
||||
* at `path`. By default, checks out the latest revision from GitHub.
|
||||
*/
|
||||
async function getLanguageRepo(outPath, options) {
|
||||
if (!options || 'ref' in options) {
|
||||
utils.fetchRepo({
|
||||
repo: 'sass',
|
||||
outPath: utils.BUILD_PATH,
|
||||
ref: options?.ref ?? 'main',
|
||||
});
|
||||
}
|
||||
else {
|
||||
await utils.cleanDir('build/sass');
|
||||
await utils.link(options.path, 'build/sass');
|
||||
}
|
||||
// Workaround for https://github.com/shelljs/shelljs/issues/198
|
||||
// This file is a symlink which gets messed up by `shell.cp` (called from
|
||||
// `utils.link`) on Windows.
|
||||
if (process.platform === 'win32')
|
||||
shell.rm('build/sass/spec/README.md');
|
||||
await utils.link('build/sass/js-api-doc', p.join(outPath, 'sass'));
|
||||
buildEmbeddedProtocol();
|
||||
}
|
||||
// Builds the embedded proto into a TS file.
|
||||
function buildEmbeddedProtocol() {
|
||||
const version = shell.exec('npx buf --version', { silent: true }).stdout.trim();
|
||||
console.log(`Building TS with buf ${version}.`);
|
||||
shell.exec('npx buf generate');
|
||||
}
|
||||
//# sourceMappingURL=get-language-repo.js.map
|
||||
1
node_modules/sass-embedded/dist/tool/get-language-repo.js.map
generated
vendored
Normal file
1
node_modules/sass-embedded/dist/tool/get-language-repo.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"get-language-repo.js","sourceRoot":"","sources":["../../tool/get-language-repo.ts"],"names":[],"mappings":";AAAA,uEAAuE;AACvE,gEAAgE;AAChE,uCAAuC;;AAcvC,0CAuBC;AAnCD,0BAA0B;AAC1B,iCAAiC;AAEjC,iCAAiC;AAEjC;;;;;;GAMG;AACI,KAAK,UAAU,eAAe,CACnC,OAAe,EACf,OAAwC;IAExC,IAAI,CAAC,OAAO,IAAI,KAAK,IAAI,OAAO,EAAE,CAAC;QACjC,KAAK,CAAC,SAAS,CAAC;YACd,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,KAAK,CAAC,UAAU;YACzB,GAAG,EAAE,OAAO,EAAE,GAAG,IAAI,MAAM;SAC5B,CAAC,CAAC;IACL,CAAC;SAAM,CAAC;QACN,MAAM,KAAK,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;QACnC,MAAM,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;IAC/C,CAAC;IAED,+DAA+D;IAC/D,yEAAyE;IACzE,4BAA4B;IAC5B,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO;QAAE,KAAK,CAAC,EAAE,CAAC,2BAA2B,CAAC,CAAC;IAExE,MAAM,KAAK,CAAC,IAAI,CAAC,uBAAuB,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;IAEnE,qBAAqB,EAAE,CAAC;AAC1B,CAAC;AAED,4CAA4C;AAC5C,SAAS,qBAAqB;IAC5B,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,mBAAmB,EAAE,EAAC,MAAM,EAAE,IAAI,EAAC,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;IAC9E,OAAO,CAAC,GAAG,CAAC,wBAAwB,OAAO,GAAG,CAAC,CAAC;IAChD,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;AACjC,CAAC"}
|
||||
83
node_modules/sass-embedded/dist/tool/init.js
generated
vendored
Normal file
83
node_modules/sass-embedded/dist/tool/init.js
generated
vendored
Normal file
@@ -0,0 +1,83 @@
|
||||
"use strict";
|
||||
// Copyright 2020 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 yargs_1 = require("yargs");
|
||||
const get_deprecations_1 = require("./get-deprecations");
|
||||
const get_embedded_compiler_1 = require("./get-embedded-compiler");
|
||||
const get_language_repo_1 = require("./get-language-repo");
|
||||
const argv = (0, yargs_1.default)(process.argv.slice(2))
|
||||
.option('compiler-path', {
|
||||
type: 'string',
|
||||
description: 'Build the Embedded Dart Sass binary from the source at this path.',
|
||||
})
|
||||
.option('compiler-ref', {
|
||||
type: 'string',
|
||||
description: 'Build the Embedded Dart Sass binary from this Git ref.',
|
||||
})
|
||||
.option('compiler-js', {
|
||||
type: 'boolean',
|
||||
description: 'Build the Embedded Dart Sass with dart2js.',
|
||||
})
|
||||
.option('skip-compiler', {
|
||||
type: 'boolean',
|
||||
description: "Don't Embedded Dart Sass at all.",
|
||||
})
|
||||
.option('language-path', {
|
||||
type: 'string',
|
||||
description: 'Use the Sass language repo from the source at this path.',
|
||||
})
|
||||
.option('language-ref', {
|
||||
type: 'string',
|
||||
description: 'Use the Sass language repo from this Git ref.',
|
||||
})
|
||||
.conflicts({
|
||||
'compiler-path': ['compiler-ref', 'skip-compiler'],
|
||||
'compiler-ref': ['skip-compiler'],
|
||||
'language-path': ['language-ref'],
|
||||
})
|
||||
.parseSync();
|
||||
void (async () => {
|
||||
try {
|
||||
const outPath = 'lib/src/vendor';
|
||||
if (argv['language-ref']) {
|
||||
await (0, get_language_repo_1.getLanguageRepo)(outPath, {
|
||||
ref: argv['language-ref'],
|
||||
});
|
||||
}
|
||||
else if (argv['language-path']) {
|
||||
await (0, get_language_repo_1.getLanguageRepo)(outPath, {
|
||||
path: argv['language-path'],
|
||||
});
|
||||
}
|
||||
else {
|
||||
await (0, get_language_repo_1.getLanguageRepo)(outPath);
|
||||
}
|
||||
if (!argv['skip-compiler']) {
|
||||
if (argv['compiler-ref']) {
|
||||
await (0, get_embedded_compiler_1.getEmbeddedCompiler)({
|
||||
ref: argv['compiler-ref'],
|
||||
js: argv['compiler-js'],
|
||||
});
|
||||
}
|
||||
else if (argv['compiler-path']) {
|
||||
await (0, get_embedded_compiler_1.getEmbeddedCompiler)({
|
||||
path: argv['compiler-path'],
|
||||
js: argv['compiler-js'],
|
||||
});
|
||||
}
|
||||
else {
|
||||
await (0, get_embedded_compiler_1.getEmbeddedCompiler)({
|
||||
js: argv['compiler-js'],
|
||||
});
|
||||
}
|
||||
}
|
||||
await (0, get_deprecations_1.getDeprecations)(outPath);
|
||||
}
|
||||
catch (error) {
|
||||
console.error(error);
|
||||
process.exitCode = 1;
|
||||
}
|
||||
})();
|
||||
//# sourceMappingURL=init.js.map
|
||||
1
node_modules/sass-embedded/dist/tool/init.js.map
generated
vendored
Normal file
1
node_modules/sass-embedded/dist/tool/init.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../tool/init.ts"],"names":[],"mappings":";AAAA,uEAAuE;AACvE,gEAAgE;AAChE,uCAAuC;;AAEvC,iCAA0B;AAE1B,yDAAmD;AACnD,mEAA4D;AAC5D,2DAAoD;AAEpD,MAAM,IAAI,GAAG,IAAA,eAAK,EAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;KACtC,MAAM,CAAC,eAAe,EAAE;IACvB,IAAI,EAAE,QAAQ;IACd,WAAW,EACT,mEAAmE;CACtE,CAAC;KACD,MAAM,CAAC,cAAc,EAAE;IACtB,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,wDAAwD;CACtE,CAAC;KACD,MAAM,CAAC,aAAa,EAAE;IACrB,IAAI,EAAE,SAAS;IACf,WAAW,EAAE,4CAA4C;CAC1D,CAAC;KACD,MAAM,CAAC,eAAe,EAAE;IACvB,IAAI,EAAE,SAAS;IACf,WAAW,EAAE,kCAAkC;CAChD,CAAC;KACD,MAAM,CAAC,eAAe,EAAE;IACvB,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,0DAA0D;CACxE,CAAC;KACD,MAAM,CAAC,cAAc,EAAE;IACtB,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,+CAA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,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QAED,MAAM,IAAA,kCAAe,EAAC,OAAO,CAAC,CAAC;IACjC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACrB,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACvB,CAAC;AACH,CAAC,CAAC,EAAE,CAAC"}
|
||||
129
node_modules/sass-embedded/dist/tool/prepare-optional-release.js
generated
vendored
Normal file
129
node_modules/sass-embedded/dist/tool/prepare-optional-release.js
generated
vendored
Normal file
@@ -0,0 +1,129 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.nodePlatformToDartPlatform = nodePlatformToDartPlatform;
|
||||
exports.nodeArchToDartArch = nodeArchToDartArch;
|
||||
const extractZip = require("extract-zip");
|
||||
const fs_1 = require("fs");
|
||||
const p = require("path");
|
||||
const tar_1 = require("tar");
|
||||
const yargs_1 = require("yargs");
|
||||
const pkg = require("../package.json");
|
||||
const utils = require("./utils");
|
||||
const argv = (0, yargs_1.default)(process.argv.slice(2))
|
||||
.option('package', {
|
||||
type: 'string',
|
||||
description: 'Directory name under `npm` directory that contains optional dependencies.',
|
||||
demandOption: true,
|
||||
choices: Object.keys(pkg.optionalDependencies).map(name => name.split('sass-embedded-')[1]),
|
||||
})
|
||||
.parseSync();
|
||||
// Converts a Node-style platform name as returned by `process.platform` into a
|
||||
// name used by Dart Sass. Throws if the operating system is not supported by
|
||||
// Dart Sass Embedded.
|
||||
function nodePlatformToDartPlatform(platform) {
|
||||
switch (platform) {
|
||||
case 'android':
|
||||
return 'android';
|
||||
case 'linux':
|
||||
case 'linux-musl':
|
||||
return 'linux';
|
||||
case 'darwin':
|
||||
return 'macos';
|
||||
case 'win32':
|
||||
return 'windows';
|
||||
default:
|
||||
throw Error(`Platform ${platform} is not supported.`);
|
||||
}
|
||||
}
|
||||
// Converts a Node-style architecture name as returned by `process.arch` into a
|
||||
// name used by Dart Sass. Throws if the architecture is not supported by Dart
|
||||
// Sass Embedded.
|
||||
function nodeArchToDartArch(arch) {
|
||||
switch (arch) {
|
||||
case 'x64':
|
||||
return 'x64';
|
||||
case 'arm':
|
||||
return 'arm';
|
||||
case 'arm64':
|
||||
return 'arm64';
|
||||
case 'riscv64':
|
||||
return 'riscv64';
|
||||
default:
|
||||
throw Error(`Architecture ${arch} is not supported.`);
|
||||
}
|
||||
}
|
||||
// Get the platform's file extension for archives.
|
||||
function getArchiveExtension(platform) {
|
||||
return platform === 'windows' ? '.zip' : '.tar.gz';
|
||||
}
|
||||
// Downloads the release for `repo` located at `assetUrl`, then unzips it into
|
||||
// `outPath`.
|
||||
async function downloadRelease(options) {
|
||||
console.log(`Downloading ${options.repo} release asset.`);
|
||||
const response = await fetch(options.assetUrl, {
|
||||
redirect: 'follow',
|
||||
});
|
||||
if (!response.ok) {
|
||||
throw Error(`Failed to download ${options.repo} release asset: ${response.statusText}`);
|
||||
}
|
||||
const releaseAsset = Buffer.from(await response.arrayBuffer());
|
||||
console.log(`Unzipping ${options.repo} release asset to ${options.outPath}.`);
|
||||
await utils.cleanDir(p.join(options.outPath, options.repo));
|
||||
const archiveExtension = options.assetUrl.endsWith('.zip')
|
||||
? '.zip'
|
||||
: '.tar.gz';
|
||||
const zippedAssetPath = options.outPath + '/' + options.repo + archiveExtension;
|
||||
await fs_1.promises.writeFile(zippedAssetPath, releaseAsset);
|
||||
if (archiveExtension === '.zip') {
|
||||
await extractZip(zippedAssetPath, {
|
||||
dir: p.join(process.cwd(), options.outPath),
|
||||
});
|
||||
}
|
||||
else {
|
||||
(0, tar_1.extract)({
|
||||
file: zippedAssetPath,
|
||||
cwd: options.outPath,
|
||||
sync: true,
|
||||
});
|
||||
}
|
||||
await fs_1.promises.unlink(zippedAssetPath);
|
||||
}
|
||||
void (async () => {
|
||||
try {
|
||||
const version = pkg['compiler-version'];
|
||||
if (version.endsWith('-dev')) {
|
||||
throw Error("Can't release optional packages for a -dev compiler version.");
|
||||
}
|
||||
const optPkg = JSON.parse((await fs_1.promises.readFile(p.join('npm', argv.package, 'package.json'))).toString());
|
||||
if (optPkg.version !== pkg.version) {
|
||||
throw Error("Optional package's version does not match main package's version");
|
||||
}
|
||||
const sassDependencyVersion = optPkg.dependencies?.sass;
|
||||
if (sassDependencyVersion !== undefined) {
|
||||
if (sassDependencyVersion !== pkg.version) {
|
||||
throw Error("Optional package's sass dependency version does not match main package's version");
|
||||
}
|
||||
return;
|
||||
}
|
||||
const index = argv.package.lastIndexOf('-');
|
||||
const nodePlatform = argv.package.substring(0, index);
|
||||
const nodeArch = argv.package.substring(index + 1);
|
||||
const dartPlatform = nodePlatformToDartPlatform(nodePlatform);
|
||||
const dartArch = nodeArchToDartArch(nodeArch);
|
||||
const isMusl = nodePlatform === 'linux-musl';
|
||||
const outPath = p.join('npm', argv.package);
|
||||
await downloadRelease({
|
||||
repo: 'dart-sass',
|
||||
assetUrl: 'https://github.com/sass/dart-sass/releases/download/' +
|
||||
`${version}/dart-sass-${version}-` +
|
||||
`${dartPlatform}-${dartArch}${isMusl ? '-musl' : ''}` +
|
||||
`${getArchiveExtension(dartPlatform)}`,
|
||||
outPath,
|
||||
});
|
||||
}
|
||||
catch (error) {
|
||||
console.error(error);
|
||||
process.exitCode = 1;
|
||||
}
|
||||
})();
|
||||
//# sourceMappingURL=prepare-optional-release.js.map
|
||||
1
node_modules/sass-embedded/dist/tool/prepare-optional-release.js.map
generated
vendored
Normal file
1
node_modules/sass-embedded/dist/tool/prepare-optional-release.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"prepare-optional-release.js","sourceRoot":"","sources":["../../tool/prepare-optional-release.ts"],"names":[],"mappings":";;AAgCA,gEAcC;AAKD,gDAaC;AAhED,0CAA2C;AAC3C,2BAAkC;AAClC,0BAA0B;AAC1B,6BAA0C;AAC1C,iCAA0B;AAE1B,uCAAuC;AACvC,iCAAiC;AAUjC,MAAM,IAAI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GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;QACnD,MAAM,YAAY,GAAG,0BAA0B,CAAC,YAAY,CAAC,CAAC;QAC9D,MAAM,QAAQ,GAAG,kBAAkB,CAAC,QAAQ,CAAC,CAAC;QAC9C,MAAM,MAAM,GAAG,YAAY,KAAK,YAAY,CAAC;QAC7C,MAAM,OAAO,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QAC5C,MAAM,eAAe,CAAC;YACpB,IAAI,EAAE,WAAW;YACjB,QAAQ,EACN,sDAAsD;gBACtD,GAAG,OAAO,cAAc,OAAO,GAAG;gBAClC,GAAG,YAAY,IAAI,QAAQ,GAAG,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;gBACrD,GAAG,mBAAmB,CAAC,YAAY,CAAC,EAAE;YACxC,OAAO;SACR,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACrB,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACvB,CAAC;AACH,CAAC,CAAC,EAAE,CAAC"}
|
||||
53
node_modules/sass-embedded/dist/tool/prepare-release.js
generated
vendored
Normal file
53
node_modules/sass-embedded/dist/tool/prepare-release.js
generated
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
"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
|
||||
1
node_modules/sass-embedded/dist/tool/prepare-release.js.map
generated
vendored
Normal file
1
node_modules/sass-embedded/dist/tool/prepare-release.js.map
generated
vendored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,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;IACtC,IAAI,GAAG,KAAK,aAAa,cAAc,EAAE,EAAE,CAAC;QAC1C,MAAM,KAAK,CACT,cAAc,GAAG,+CAA+C,cAAc,GAAG,CAClF,CAAC;IACJ,CAAC;IAED,KAAK,MAAM,CAAC,GAAG,EAAE,OAAO,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,EAAE,CAAC;QACtE,IAAI,OAAO,KAAK,cAAc,EAAE,CAAC;YAC/B,MAAM,KAAK,CACT,uBAAuB,GAAG,4BAA4B,cAAc,GAAG,CACxE,CAAC;QACJ,CAAC;IACH,CAAC;IAED,IAAI,cAAc,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC;QACvC,MAAM,KAAK,CAAC,GAAG,cAAc,oBAAoB,CAAC,CAAC;IACrD,CAAC;IAED,MAAM,aAAa,GAAG,IAAI,MAAM,CAAC,OAAO,cAAc,GAAG,EAAE,GAAG,CAAC,CAAC;IAChE,MAAM,SAAS,GAAG,MAAM,aAAE,CAAC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC;IAC5D,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,aAAa,CAAC,EAAE,CAAC;QACpC,MAAM,KAAK,CAAC,kCAAkC,cAAc,GAAG,CAAC,CAAC;IACnE,CAAC;AACH,CAAC"}
|
||||
75
node_modules/sass-embedded/dist/tool/utils.js
generated
vendored
Normal file
75
node_modules/sass-embedded/dist/tool/utils.js
generated
vendored
Normal file
@@ -0,0 +1,75 @@
|
||||
"use strict";
|
||||
// Copyright 2020 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 });
|
||||
exports.BUILD_PATH = void 0;
|
||||
exports.fetchRepo = fetchRepo;
|
||||
exports.link = link;
|
||||
exports.cleanDir = cleanDir;
|
||||
exports.sameTarget = sameTarget;
|
||||
const fs_1 = require("fs");
|
||||
const p = require("path");
|
||||
const shell = require("shelljs");
|
||||
shell.config.fatal = true;
|
||||
// Directory that holds source files.
|
||||
exports.BUILD_PATH = 'build';
|
||||
// Clones `repo` into `outPath`, then checks out the given Git `ref`.
|
||||
function fetchRepo(options) {
|
||||
const path = p.join(options.outPath, options.repo);
|
||||
if ((0, fs_1.existsSync)(p.join(path, '.git')) && (0, fs_1.lstatSync)(path).isSymbolicLink()) {
|
||||
throw (`${path} is a symlink to a git repo, not overwriting.\n` +
|
||||
`Run "rm ${path}" and try again.`);
|
||||
}
|
||||
if (!(0, fs_1.existsSync)(path)) {
|
||||
console.log(`Cloning ${options.repo} into ${options.outPath}.`);
|
||||
shell.exec(`git clone \
|
||||
--depth=1 \
|
||||
https://github.com/sass/${options.repo} \
|
||||
${path}`);
|
||||
}
|
||||
const version = options.ref === 'main' ? 'latest update' : `commit ${options.ref}`;
|
||||
console.log(`Fetching ${version} for ${options.repo}.`);
|
||||
shell.exec(`git fetch --depth=1 origin ${options.ref} && git reset --hard FETCH_HEAD`, { cwd: path });
|
||||
}
|
||||
// Links or copies the contents of `source` into `destination`.
|
||||
async function link(source, destination) {
|
||||
await cleanDir(destination);
|
||||
if (process.platform === 'win32') {
|
||||
console.log(`Copying ${source} into ${destination}.`);
|
||||
shell.cp('-R', source, destination);
|
||||
}
|
||||
else {
|
||||
source = p.resolve(source);
|
||||
console.log(`Linking ${source} into ${destination}.`);
|
||||
// Symlinking doesn't play nice with Jasmine's test globbing on Windows.
|
||||
await fs_1.promises.symlink(source, destination);
|
||||
}
|
||||
}
|
||||
// Ensures that `dir` does not exist, but its parent directory does.
|
||||
async function cleanDir(dir) {
|
||||
await fs_1.promises.mkdir(p.dirname(dir), { recursive: true });
|
||||
try {
|
||||
await fs_1.promises.rm(dir, { force: true, recursive: true });
|
||||
}
|
||||
catch (_) {
|
||||
// If dir doesn't exist yet, that's fine.
|
||||
}
|
||||
}
|
||||
// Returns whether [path1] and [path2] are symlinks that refer to the same file.
|
||||
async function sameTarget(path1, path2) {
|
||||
const realpath1 = await tryRealpath(path1);
|
||||
if (realpath1 === null)
|
||||
return false;
|
||||
return realpath1 === (await tryRealpath(path2));
|
||||
}
|
||||
// Like `fs.realpath()`, but returns `null` if the path doesn't exist on disk.
|
||||
async function tryRealpath(path) {
|
||||
try {
|
||||
return await fs_1.promises.realpath(p.resolve(path));
|
||||
}
|
||||
catch (_) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=utils.js.map
|
||||
1
node_modules/sass-embedded/dist/tool/utils.js.map
generated
vendored
Normal file
1
node_modules/sass-embedded/dist/tool/utils.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../tool/utils.ts"],"names":[],"mappings":";AAAA,uEAAuE;AACvE,gEAAgE;AAChE,uCAAuC;;;AAYvC,8BA8BC;AAGD,oBAWC;AAGD,4BAOC;AAGD,gCAQC;AA3ED,2BAAyD;AACzD,0BAA0B;AAC1B,iCAAiC;AAEjC,KAAK,CAAC,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC;AAE1B,qCAAqC;AACxB,QAAA,UAAU,GAAG,OAAO,CAAC;AAElC,qEAAqE;AACrE,SAAgB,SAAS,CAAC,OAIzB;IACC,MAAM,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IACnD,IAAI,IAAA,eAAU,EAAC,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,IAAI,IAAA,cAAS,EAAC,IAAI,CAAC,CAAC,cAAc,EAAE,EAAE,CAAC;QACzE,MAAM,CACJ,GAAG,IAAI,iDAAiD;YACxD,WAAW,IAAI,kBAAkB,CAClC,CAAC;IACJ,CAAC;IAED,IAAI,CAAC,IAAA,eAAU,EAAC,IAAI,CAAC,EAA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