Rewritten SVR.JS from scratch - the build system for the new SVR.JS is set up, but the source is just placeholders.
5
.gitignore
vendored
|
@ -1,2 +1,3 @@
|
|||
temp
|
||||
log
|
||||
node_modules
|
||||
generatedAssets
|
||||
dist
|
||||
|
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.6 KiB |
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 9.4 KiB |
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 5.9 KiB |
Before Width: | Height: | Size: 8 KiB After Width: | Height: | Size: 8 KiB |
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 9.8 KiB After Width: | Height: | Size: 9.8 KiB |
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 8.5 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 6.3 KiB |
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 6.3 KiB |
Before Width: | Height: | Size: 7 KiB After Width: | Height: | Size: 7 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 9.8 KiB After Width: | Height: | Size: 9.8 KiB |
Before Width: | Height: | Size: 9.5 KiB After Width: | Height: | Size: 9.5 KiB |
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 5.9 KiB |
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 6.5 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 7.7 KiB |
140
esbuild.config.js
Normal file
|
@ -0,0 +1,140 @@
|
|||
const esbuild = require("esbuild");
|
||||
const esbuildCopyPlugin = require("esbuild-plugin-copy");
|
||||
const fs = require("fs");
|
||||
const ejs = require("ejs");
|
||||
const dependencies = JSON.parse(fs.readFileSync(__dirname + "/package.json")).dependencies || {};
|
||||
const requiredDependencyList = Object.keys(dependencies);
|
||||
let dependencyList = Object.keys(dependencies);
|
||||
const version = JSON.parse(fs.readFileSync(__dirname + "/svrjs.json")).version;
|
||||
|
||||
// Function to find and add all dependencies into the dependencyList array.
|
||||
function findAllDependencies(curList) {
|
||||
// If no curList parameter is specified, use dependencyList.
|
||||
if (!curList) curList = dependencyList;
|
||||
curList.forEach((dependency) => {
|
||||
const newDeplist = Object.keys(JSON.parse(fs.readFileSync(__dirname + "/node_modules/" + dependency.replace(/\/\.\./g,"") + "/package.json").toString()).dependencies || {});
|
||||
let noDupNewDepList = [];
|
||||
newDeplist.forEach((dep) => {
|
||||
// Ignore duplicates
|
||||
if (dependencyList.indexOf(dep) == -1) {
|
||||
noDupNewDepList.push(dep);
|
||||
dependencyList.push(dep);
|
||||
}
|
||||
});
|
||||
// Call findAllDependencies for the dependency list.
|
||||
findAllDependencies(noDupNewDepList);
|
||||
});
|
||||
}
|
||||
|
||||
// Get list of all dependencies
|
||||
findAllDependencies();
|
||||
dependencyList = dependencyList.sort();
|
||||
|
||||
// Create and populate an object, where whenever the dependencies are required are listed.
|
||||
let dependenciesAreRequired = {};
|
||||
dependencyList.forEach((dependency) => {
|
||||
dependenciesAreRequired[dependency] = false;
|
||||
});
|
||||
requiredDependencyList.forEach((dependency) => {
|
||||
dependenciesAreRequired[dependency] = true;
|
||||
});
|
||||
|
||||
// Create the template functions using EJS
|
||||
const layoutTemplate = ejs.compile(fs.readFileSync(__dirname + "/templates/layout.ejs").toString());
|
||||
const testsTemplate = ejs.compile(fs.readFileSync(__dirname + "/templates/tests.ejs").toString());
|
||||
const indexTemplate = ejs.compile(fs.readFileSync(__dirname + "/templates/index.ejs").toString());
|
||||
const licensesTemplate = ejs.compile(fs.readFileSync(__dirname + "/templates/licenses.ejs").toString());
|
||||
const licenseElementTemplate = ejs.compile(fs.readFileSync(__dirname + "/templates/licenseElement.ejs").toString());
|
||||
|
||||
let licenseElements = "";
|
||||
|
||||
// Generate the licenses list in HTML
|
||||
dependencyList.forEach((dependency) => {
|
||||
const packageJSON = JSON.parse(fs.readFileSync(__dirname + "/node_modules/" + dependency.replace(/\/\.\./g,"") + "/package.json").toString());
|
||||
licenseElements += licenseElementTemplate({
|
||||
name: packageJSON.name,
|
||||
license: packageJSON.license,
|
||||
description: packageJSON.description || "No description",
|
||||
author: packageJSON.author ? packageJSON.author.name : packageJSON.author,
|
||||
required: dependenciesAreRequired[dependency]
|
||||
});
|
||||
});
|
||||
|
||||
// Generate pages
|
||||
const licensesPage = layoutTemplate({
|
||||
title: "SVR.JS " + version + " Licenses",
|
||||
content: licensesTemplate({
|
||||
version: version,
|
||||
licenses: licenseElements
|
||||
})
|
||||
});
|
||||
|
||||
const testsPage = layoutTemplate({
|
||||
title: "SVR.JS " + version + " Tests",
|
||||
content: testsTemplate({
|
||||
version: version
|
||||
})
|
||||
});
|
||||
|
||||
const indexPage = layoutTemplate({
|
||||
title: "SVR.JS " + version,
|
||||
content: indexTemplate({
|
||||
version: version
|
||||
})
|
||||
});
|
||||
|
||||
// Remove the generated assets directory if exists, and create a new one.
|
||||
if (fs.existsSync(__dirname + "/generatedAssets")) {
|
||||
if (fs.rmSync) fs.rmSync(__dirname + "/generatedAssets", {recursive: true});
|
||||
else fs.rmdirSync(__dirname + "/generatedAssets", {recursive: true});
|
||||
}
|
||||
fs.mkdirSync(__dirname + "/generatedAssets");
|
||||
|
||||
// Remove the dist directory if exists, and create a new one.
|
||||
if (fs.existsSync(__dirname + "/dist")) {
|
||||
if (fs.rmSync) fs.rmSync(__dirname + "/dist", {recursive: true});
|
||||
else fs.rmdirSync(__dirname + "/dist", {recursive: true});
|
||||
}
|
||||
fs.mkdirSync(__dirname + "/dist");
|
||||
|
||||
// Create a licenses directory
|
||||
fs.mkdirSync(__dirname + "/generatedAssets/licenses");
|
||||
|
||||
// Write to HTML files
|
||||
fs.writeFileSync(__dirname + "/generatedAssets/index.html", indexPage);
|
||||
fs.writeFileSync(__dirname + "/generatedAssets/tests.html", testsPage);
|
||||
fs.writeFileSync(__dirname + "/generatedAssets/licenses/index.html", licensesPage);
|
||||
|
||||
// Bundle the source and copy the assets using esbuild and esbuild-plugin-copy
|
||||
esbuild.build({
|
||||
entryPoints: ["src/index.js"], // Your entry file
|
||||
bundle: true,
|
||||
outfile: "dist/svr.js", // Output file
|
||||
platform: "node",
|
||||
target: "es2020",
|
||||
plugins: [
|
||||
esbuildCopyPlugin.copy({
|
||||
resolveFrom: __dirname,
|
||||
assets: {
|
||||
from: ["./utilities/**/*"],
|
||||
to: ["./dist"],
|
||||
}
|
||||
}),
|
||||
esbuildCopyPlugin.copy({
|
||||
resolveFrom: __dirname,
|
||||
assets: {
|
||||
from: ["./assets/**/*"],
|
||||
to: ["./dist"],
|
||||
}
|
||||
}),
|
||||
esbuildCopyPlugin.copy({
|
||||
resolveFrom: __dirname,
|
||||
assets: {
|
||||
from: ["./generatedAssets/**/*"],
|
||||
to: ["./dist"],
|
||||
}
|
||||
})
|
||||
],
|
||||
}).catch((err) => {
|
||||
throw err;
|
||||
});
|
10
eslint.config.mjs
Normal file
|
@ -0,0 +1,10 @@
|
|||
import globals from "globals";
|
||||
import pluginJs from "@eslint/js";
|
||||
import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended";
|
||||
|
||||
export default [
|
||||
{files: ["**/*.js"], languageOptions: {sourceType: "commonjs"}},
|
||||
{languageOptions: { globals: {...globals.node} }},
|
||||
pluginJs.configs.recommended,
|
||||
eslintPluginPrettierRecommended
|
||||
];
|
5
jest.config.js
Normal file
|
@ -0,0 +1,5 @@
|
|||
module.exports = {
|
||||
testEnvironment: 'node',
|
||||
testMatch: ['**/tests/**/*.test.js'],
|
||||
verbose: true,
|
||||
};
|
|
@ -1,21 +0,0 @@
|
|||
|
||||
Copyright 2009–2014 Contributors. All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to
|
||||
deal in the Software without restriction, including without limitation the
|
||||
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
IN THE SOFTWARE.
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
Copyright (c) 2010-2014 Caolan McMahon
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
|
@ -1,19 +0,0 @@
|
|||
Copyright Fedor Indutny, 2015.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
|
@ -1,21 +0,0 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2020 Jordan Harband
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
|
@ -1,15 +0,0 @@
|
|||
The ISC License
|
||||
|
||||
Copyright (c) Isaac Z. Schlueter and Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
@ -1,21 +0,0 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2023 Jordan Harband
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
|
@ -1,15 +0,0 @@
|
|||
The ISC License
|
||||
|
||||
Copyright (c) Isaac Z. Schlueter and Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
@ -1,21 +0,0 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2024 Jordan Harband
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
|
@ -1,21 +0,0 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2024 Jordan Harband
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
|
@ -1,21 +0,0 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2011-present Felix Geisendörfer, and contributors.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
|
@ -1,15 +0,0 @@
|
|||
The ISC License
|
||||
|
||||
Copyright (c) Isaac Z. Schlueter and Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
@ -1,20 +0,0 @@
|
|||
Copyright (c) 2013 Raynos.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2020 Jordan Harband
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
|
@ -1,21 +0,0 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2022 Jordan Harband
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
|
@ -1,15 +0,0 @@
|
|||
The ISC License
|
||||
|
||||
Copyright (c) 2011-2022 Isaac Z. Schlueter, Ben Noordhuis, and Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
@ -1,21 +0,0 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2022 Inspect JS
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
|
@ -1,21 +0,0 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2022 Inspect JS
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
|
@ -1,21 +0,0 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2016 Jordan Harband
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
|
@ -1,21 +0,0 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) Jordan Harband and contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
|
@ -1,9 +0,0 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (lukeed.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@ -1,476 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>SVR.JS Nightly-GitMain Licenses</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta charset="UTF-8" />
|
||||
<style>
|
||||
html {
|
||||
background-color: #dfffdf;
|
||||
color: #000000;
|
||||
font-family: FreeSans, Helvetica, Tahoma, Verdana, Arial, sans-serif;
|
||||
margin: 0.75em;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: #ffffff;
|
||||
padding: 0.5em 0.5em 0.1em;
|
||||
margin: 0.5em auto;
|
||||
width: 90%;
|
||||
max-width: 800px;
|
||||
-webkit-box-shadow: 0 5px 10px 0 rgba(0, 0, 0, 0.15);
|
||||
-moz-box-shadow: 0 5px 10px 0 rgba(0, 0, 0, 0.15);
|
||||
box-shadow: 0 5px 10px 0 rgba(0, 0, 0, 0.15)
|
||||
}
|
||||
|
||||
h1 {
|
||||
text-align: center;
|
||||
font-size: 2.25em;
|
||||
margin: 0.3em 0 0.5em
|
||||
}
|
||||
|
||||
pre,
|
||||
code {
|
||||
background-color: #dfffdf;
|
||||
-webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
|
||||
-moz-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
|
||||
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
|
||||
display: block;
|
||||
padding: 0.2em;
|
||||
font-family: "DejaVu Sans Mono", "Bitstream Vera Sans Mono", Hack, Menlo, Consolas, Monaco, monospace;
|
||||
font-size: 0.85em;
|
||||
margin: auto;
|
||||
width: 95%;
|
||||
}
|
||||
|
||||
@media screen and (prefers-color-scheme: dark) {
|
||||
html {
|
||||
background-color: #002000;
|
||||
color: #ffffff
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: #000f00;
|
||||
-webkit-box-shadow: 0 5px 10px 0 rgba(127, 127, 127, 0.15);
|
||||
-moz-box-shadow: 0 5px 10px 0 rgba(127, 127, 127, 0.15);
|
||||
box-shadow: 0 5px 10px 0 rgba(127, 127, 127, 0.15)
|
||||
}
|
||||
|
||||
pre,
|
||||
code {
|
||||
background-color: #002000;
|
||||
-webkit-box-shadow: 0 2px 4px 0 rgba(127, 127, 127, 0.1);
|
||||
-moz-box-shadow: 0 2px 4px 0 rgba(127, 127, 127, 0.1);
|
||||
box-shadow: 0 2px 4px 0 rgba(127, 127, 127, 0.1)
|
||||
}
|
||||
|
||||
a {
|
||||
color: #ffffff
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: #00ff00
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>SVR.JS Nightly-GitMain Licenses</h1>
|
||||
<h2>SVR.JS Nightly-GitMain</h2>
|
||||
<div style="display: inline-block; text-align: left; border-width: 2px; border-style: solid; border-color: gray; padding: 8px;">
|
||||
MIT License<br/>
|
||||
<br/>
|
||||
Copyright (c) 2018-2024 SVR.JS<br/>
|
||||
<br/>
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy<br/>
|
||||
of this software and associated documentation files (the "Software"), to deal<br/>
|
||||
in the Software without restriction, including without limitation the rights<br/>
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell<br/>
|
||||
copies of the Software, and to permit persons to whom the Software is<br/>
|
||||
furnished to do so, subject to the following conditions:<br/>
|
||||
<br/>
|
||||
The above copyright notice and this permission notice shall be included in all<br/>
|
||||
copies or substantial portions of the Software.<br/>
|
||||
<br/>
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR<br/>
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,<br/>
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE<br/>
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER<br/>
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,<br/>
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE<br/>
|
||||
SOFTWARE.<br/>
|
||||
</div>
|
||||
<h2>Packages used by SVR.JS Nightly-GitMain</h2>
|
||||
<div style="width: 100%; max-width: 1280px; margin: auto">
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: MIT</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/asap.txt"><b>asap</b></a>
|
||||
</div>
|
||||
<div style="font-size: 12px;">
|
||||
High-priority task queue for Node.js and browsers
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: MIT</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/asn1.js.txt"><b>asn1.js</b></a> (by Fedor Indutny)
|
||||
</div>
|
||||
<div style="font-size: 12px;">
|
||||
ASN.1 encoder and decoder
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: MIT</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/asn1.js-rfc2560.txt"><b>asn1.js-rfc2560</b></a> (by Fedor Indutny)
|
||||
</div>
|
||||
<div style="font-size: 12px;">
|
||||
RFC2560 structures for asn1.js
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: MIT</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/asn1.js-rfc5280.txt"><b>asn1.js-rfc5280</b></a> (by Felix Hanley)
|
||||
</div>
|
||||
<div style="font-size: 12px;">
|
||||
RFC5280 extension structures for asn1.js
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: MIT</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/async.txt"><b>async</b></a> (by Caolan McMahon)
|
||||
</div>
|
||||
<div style="font-size: 12px;">
|
||||
Higher-order functions and common patterns for asynchronous code
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: MIT</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/bn.js.txt"><b>bn.js</b></a> (by Fedor Indutny)
|
||||
</div>
|
||||
<div style="font-size: 12px;">
|
||||
Big number implementation in pure javascript
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: MIT</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/call-bind.txt"><b>call-bind</b></a> (by Jordan Harband)
|
||||
</div>
|
||||
<div style="font-size: 12px;">
|
||||
Robustly `.call.bind()` a function
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: ISC</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/chownr.txt"><b>chownr</b></a> (by Isaac Z. Schlueter)
|
||||
</div>
|
||||
<div style="font-size: 12px;">
|
||||
like `chown -R`
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: MIT</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/define-data-property.txt"><b>define-data-property</b></a> (by Jordan Harband)
|
||||
</div>
|
||||
<div style="font-size: 12px;">
|
||||
Define a data property on an object. Will fall back to assignment in an engine without descriptors.
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: ISC</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/dezalgo.txt"><b>dezalgo</b></a> (by Isaac Z. Schlueter)
|
||||
</div>
|
||||
<div style="font-size: 12px;">
|
||||
Contain async insanity so that the dark pony lord doesn't eat souls
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: MIT</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/es-define-property.txt"><b>es-define-property</b></a> (by Jordan Harband)
|
||||
</div>
|
||||
<div style="font-size: 12px;">
|
||||
`Object.defineProperty`, but not IE 8's broken one.
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: MIT</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/es-errors.txt"><b>es-errors</b></a> (by Jordan Harband)
|
||||
</div>
|
||||
<div style="font-size: 12px;">
|
||||
A simple cache for a few of the JS Error constructors.
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: MIT</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/formidable.txt"><b>formidable</b></a>
|
||||
</div>
|
||||
<div style="font-size: 12px;">
|
||||
A node.js module for parsing form data, especially file uploads.<br/>
|
||||
<b>Required by SVR.JS</b>
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: ISC</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/fs-minipass.txt"><b>fs-minipass</b></a> (by Isaac Z. Schlueter)
|
||||
</div>
|
||||
<div style="font-size: 12px;">
|
||||
fs read and write streams based on minipass<br/>
|
||||
<b>Patched to work with Bun</b>
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: MIT</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/function-bind.txt"><b>function-bind</b></a> (by Raynos)
|
||||
</div>
|
||||
<div style="font-size: 12px;">
|
||||
Implementation of Function.prototype.bind
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: MIT</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/get-intrinsic.txt"><b>get-intrinsic</b></a> (by Jordan Harband)
|
||||
</div>
|
||||
<div style="font-size: 12px;">
|
||||
Get and robustly cache all JS language-level intrinsics at first require time
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: MIT</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/gopd.txt"><b>gopd</b></a> (by Jordan Harband)
|
||||
</div>
|
||||
<div style="font-size: 12px;">
|
||||
`Object.getOwnPropertyDescriptor`, but accounts for IE's broken implementation.
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: ISC</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/graceful-fs.txt"><b>graceful-fs</b></a>
|
||||
</div>
|
||||
<div style="font-size: 12px;">
|
||||
A drop-in replacement for fs, making various improvements.<br/>
|
||||
<b>Required by SVR.JS.</b>
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: MIT</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/has-property-descriptors.txt"><b>has-property-descriptors</b></a> (by Jordan Harband)
|
||||
</div>
|
||||
<div style="font-size: 12px;">
|
||||
Does the environment have full property descriptor support? Handles IE 8's broken defineProperty/gOPD.
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: MIT</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/has-proto.txt"><b>has-proto</b></a> (by Jordan Harband)
|
||||
</div>
|
||||
<div style="font-size: 12px;">
|
||||
Does this environment have the ability to get the [[Prototype]] of an object on creation with <code>__proto__</code>?
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: MIT</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/has-symbols.txt"><b>has-symbols</b></a> (by Jordan Harband)
|
||||
</div>
|
||||
<div style="font-size: 12px;">
|
||||
Determine if the JS environment has Symbol support. Supports spec, or shams.
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: MIT</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/hasown.txt"><b>hasown</b></a> (by Jordan Harband)
|
||||
</div>
|
||||
<div style="font-size: 12px;">
|
||||
A robust, ES3 compatible, "has own property" predicate.
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: MIT</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/hexoid.txt"><b>hexoid</b></a> (by Luke Edwards)
|
||||
</div>
|
||||
<div style="font-size: 12px;">
|
||||
A tiny (190B) and extremely fast utility to generate random IDs of fixed length
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: ISC</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/inherits.txt"><b>inherits</b></a>
|
||||
</div>
|
||||
<div style="font-size: 12px;">
|
||||
Browser-friendly inheritance fully compatible with standard node.js inherits()
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: MIT</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/mime-db.txt"><b>mime-db</b></a>
|
||||
</div>
|
||||
<div style="font-size: 12px;">
|
||||
Media Type Database
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: MIT</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/mime-types.txt"><b>mime-types</b></a>
|
||||
</div>
|
||||
<div style="font-size: 12px;">
|
||||
The ultimate javascript content-type utility.<br/>
|
||||
<b>Required by SVR.JS.</b>
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: ISC</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/minimalistic-assert.txt"><b>minimalistic-assert</b></a>
|
||||
</div>
|
||||
<div style="font-size: 12px;">
|
||||
minimalistic-assert ===
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: ISC</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/minipass.txt"><b>minipass</b></a> (by Isaac Z. Schlueter)
|
||||
</div>
|
||||
<div style="font-size: 12px;">
|
||||
minimal implementation of a PassThrough stream
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: MIT</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/minizlib.txt"><b>minizlib</b></a> (by Isaac Z. Schlueter)
|
||||
</div>
|
||||
<div style="font-size: 12px;">
|
||||
A small fast zlib stream built on <a href="http://npm.im/minipass">minipass</a> and Node.js's zlib binding.
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: MIT</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/mkdirp.txt"><b>mkdirp</b></a>
|
||||
</div>
|
||||
<div style="font-size: 12px;">
|
||||
Recursively mkdir, like `mkdir -p`
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: MIT</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/object-inspect.txt"><b>object-inspect</b></a> (by James Halliday)
|
||||
</div>
|
||||
<div style="font-size: 12px;">
|
||||
string representations of objects in node and the browser
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: MIT</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/ocsp.txt"><b>ocsp</b></a> (by Fedor Indutny)
|
||||
</div>
|
||||
<div style="font-size: 12px;">
|
||||
OCSP Stapling implementation<br/>
|
||||
<b>Required by SVR.JS.</b>
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: ISC</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/once.txt"><b>once</b></a> (by Isaac Z. Schlueter)
|
||||
</div>
|
||||
<div style="font-size: 12px;">
|
||||
Run a function exactly one time
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: BSD-3</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/qs.txt"><b>qs</b></a>
|
||||
</div>
|
||||
<div style="font-size: 12px;">
|
||||
A querystring parser that supports nesting and arrays, with a depth limit
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: MIT</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/set-function-length.txt"><b>set-function-length</b></a> (by Jordan Harband)
|
||||
</div>
|
||||
<div style="font-size: 12px;">
|
||||
Set a function's length property
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: MIT</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/side-channel.txt"><b>side-channel</b></a> (by Jordan Harband)
|
||||
</div>
|
||||
<div style="font-size: 12px;">
|
||||
Store information about any JS value in a side channel. Uses WeakMap if available.
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: MIT</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/simple-lru-cache.txt"><b>simple-lru-cache</b></a> (by Gabriel Eisbruch)
|
||||
</div>
|
||||
<div style="font-size: 12px;">
|
||||
node-simple-lru-cache =====================
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: ISC</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/tar.txt"><b>tar</b></a> (by GitHub Inc.)
|
||||
</div>
|
||||
<div style="font-size: 12px;">
|
||||
tar for node<br/>
|
||||
<b>Required by SVR.JS.</b>
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: ISC</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/wrappy.txt"><b>wrappy</b></a> (by Isaac Z. Schlueter)
|
||||
</div>
|
||||
<div style="font-size: 12px;">
|
||||
Callback wrapping utility
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||
<div style="float: right;">License: ISC</div>
|
||||
<div style="font-size: 20px;">
|
||||
<a href="/licenses/yallist.txt"><b>yallist</b></a> (by Isaac Z. Schlueter)
|
||||
</div>
|
||||
<div style="font-size: 12px;">
|
||||
Yet Another Linked List
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br/>
|
||||
<img src="/powered.png" />
|
||||
</body>
|
||||
</html>
|
|
@ -1,16 +0,0 @@
|
|||
The ISC License
|
||||
|
||||
Copyright (c) Isaac Z. Schlueter
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
PERFORMANCE OF THIS SOFTWARE.
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
(The MIT License)
|
||||
|
||||
Copyright (c) 2014 Jonathan Ong <me@jongleberry.com>
|
||||
Copyright (c) 2015-2022 Douglas Christopher Wilson <doug@somethingdoug.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
'Software'), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@ -1,23 +0,0 @@
|
|||
(The MIT License)
|
||||
|
||||
Copyright (c) 2014 Jonathan Ong <me@jongleberry.com>
|
||||
Copyright (c) 2015 Douglas Christopher Wilson <doug@somethingdoug.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
'Software'), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@ -1,13 +0,0 @@
|
|||
Copyright 2015 Calvin Metcalf
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any purpose
|
||||
with or without fee is hereby granted, provided that the above copyright notice
|
||||
and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
PERFORMANCE OF THIS SOFTWARE.
|
|
@ -1,15 +0,0 @@
|
|||
The ISC License
|
||||
|
||||
Copyright (c) 2017-2023 npm, Inc., Isaac Z. Schlueter, and Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
@ -1,26 +0,0 @@
|
|||
Minizlib was created by Isaac Z. Schlueter.
|
||||
It is a derivative work of the Node.js project.
|
||||
|
||||
"""
|
||||
Copyright Isaac Z. Schlueter and Contributors
|
||||
Copyright Node.js contributors. All rights reserved.
|
||||
Copyright Joyent, Inc. and other Node contributors. All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
"""
|
|
@ -1,21 +0,0 @@
|
|||
Copyright James Halliday (mail@substack.net) and Isaac Z. Schlueter (i@izs.me)
|
||||
|
||||
This project is free software released under the MIT license:
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
|
@ -1,21 +0,0 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2013 James Halliday
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
|
@ -1,21 +0,0 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) [year] [fullname]
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
|
@ -1,15 +0,0 @@
|
|||
The ISC License
|
||||
|
||||
Copyright (c) Isaac Z. Schlueter and Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
@ -1,29 +0,0 @@
|
|||
BSD 3-Clause License
|
||||
|
||||
Copyright (c) 2014, Nathan LaFreniere and other [contributors](https://github.com/ljharb/qs/graphs/contributors)
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@ -1,21 +0,0 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) Jordan Harband and contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
|
@ -1,21 +0,0 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2019 Jordan Harband
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
|
@ -1,19 +0,0 @@
|
|||
Copyright (c) 2013 Mercadolibre.com
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
|
@ -1,15 +0,0 @@
|
|||
The ISC License
|
||||
|
||||
Copyright (c) Isaac Z. Schlueter and Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
@ -1,15 +0,0 @@
|
|||
The ISC License
|
||||
|
||||
Copyright (c) Isaac Z. Schlueter and Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
@ -1,15 +0,0 @@
|
|||
The ISC License
|
||||
|
||||
Copyright (c) Isaac Z. Schlueter and Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
1
node_modules/.bin/mkdirp
generated
vendored
|
@ -1 +0,0 @@
|
|||
../mkdirp/bin/cmd.js
|
70
node_modules/asap/CHANGES.md
generated
vendored
|
@ -1,70 +0,0 @@
|
|||
|
||||
## 2.0.6
|
||||
|
||||
Version 2.0.4 adds support for React Native by clarifying in package.json that
|
||||
the browser environment does not support Node.js domains.
|
||||
Why this is necessary, we leave as an exercise for the user.
|
||||
|
||||
## 2.0.3
|
||||
|
||||
Version 2.0.3 fixes a bug when adjusting the capacity of the task queue.
|
||||
|
||||
## 2.0.1-2.02
|
||||
|
||||
Version 2.0.1 fixes a bug in the way redirects were expressed that affected the
|
||||
function of Browserify, but which Mr would tolerate.
|
||||
|
||||
## 2.0.0
|
||||
|
||||
Version 2 of ASAP is a full rewrite with a few salient changes.
|
||||
First, the ASAP source is CommonJS only and designed with [Browserify][] and
|
||||
[Browserify-compatible][Mr] module loaders in mind.
|
||||
|
||||
[Browserify]: https://github.com/substack/node-browserify
|
||||
[Mr]: https://github.com/montagejs/mr
|
||||
|
||||
The new version has been refactored in two dimensions.
|
||||
Support for Node.js and browsers have been separated, using Browserify
|
||||
redirects and ASAP has been divided into two modules.
|
||||
The "raw" layer depends on the tasks to catch thrown exceptions and unravel
|
||||
Node.js domains.
|
||||
|
||||
The full implementation of ASAP is loadable as `require("asap")` in both Node.js
|
||||
and browsers.
|
||||
|
||||
The raw layer that lacks exception handling overhead is loadable as
|
||||
`require("asap/raw")`.
|
||||
The interface is the same for both layers.
|
||||
|
||||
Tasks are no longer required to be functions, but can rather be any object that
|
||||
implements `task.call()`.
|
||||
With this feature you can recycle task objects to avoid garbage collector churn
|
||||
and avoid closures in general.
|
||||
|
||||
The implementation has been rigorously documented so that our successors can
|
||||
understand the scope of the problem that this module solves and all of its
|
||||
nuances, ensuring that the next generation of implementations know what details
|
||||
are essential.
|
||||
|
||||
- [asap.js](https://github.com/kriskowal/asap/blob/master/asap.js)
|
||||
- [raw.js](https://github.com/kriskowal/asap/blob/master/raw.js)
|
||||
- [browser-asap.js](https://github.com/kriskowal/asap/blob/master/browser-asap.js)
|
||||
- [browser-raw.js](https://github.com/kriskowal/asap/blob/master/browser-raw.js)
|
||||
|
||||
The new version has also been rigorously tested across a broad spectrum of
|
||||
browsers, in both the window and worker context.
|
||||
The following charts capture the browser test results for the most recent
|
||||
release.
|
||||
The first chart shows test results for ASAP running in the main window context.
|
||||
The second chart shows test results for ASAP running in a web worker context.
|
||||
Test results are inconclusive (grey) on browsers that do not support web
|
||||
workers.
|
||||
These data are captured automatically by [Continuous
|
||||
Integration][].
|
||||
|
||||
![Browser Compatibility](http://kriskowal-asap.s3-website-us-west-2.amazonaws.com/train/integration-2/saucelabs-results-matrix.svg)
|
||||
|
||||
![Compatibility in Web Workers](http://kriskowal-asap.s3-website-us-west-2.amazonaws.com/train/integration-2/saucelabs-worker-results-matrix.svg)
|
||||
|
||||
[Continuous Integration]: https://github.com/kriskowal/asap/blob/master/CONTRIBUTING.md
|
||||
|
21
node_modules/asap/LICENSE.md
generated
vendored
|
@ -1,21 +0,0 @@
|
|||
|
||||
Copyright 2009–2014 Contributors. All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to
|
||||
deal in the Software without restriction, including without limitation the
|
||||
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
IN THE SOFTWARE.
|
||||
|
237
node_modules/asap/README.md
generated
vendored
|
@ -1,237 +0,0 @@
|
|||
# ASAP
|
||||
|
||||
[![Build Status](https://travis-ci.org/kriskowal/asap.png?branch=master)](https://travis-ci.org/kriskowal/asap)
|
||||
|
||||
Promise and asynchronous observer libraries, as well as hand-rolled callback
|
||||
programs and libraries, often need a mechanism to postpone the execution of a
|
||||
callback until the next available event.
|
||||
(See [Designing API’s for Asynchrony][Zalgo].)
|
||||
The `asap` function executes a task **as soon as possible** but not before it
|
||||
returns, waiting only for the completion of the current event and previously
|
||||
scheduled tasks.
|
||||
|
||||
```javascript
|
||||
asap(function () {
|
||||
// ...
|
||||
});
|
||||
```
|
||||
|
||||
[Zalgo]: http://blog.izs.me/post/59142742143/designing-apis-for-asynchrony
|
||||
|
||||
This CommonJS package provides an `asap` module that exports a function that
|
||||
executes a task function *as soon as possible*.
|
||||
|
||||
ASAP strives to schedule events to occur before yielding for IO, reflow,
|
||||
or redrawing.
|
||||
Each event receives an independent stack, with only platform code in parent
|
||||
frames and the events run in the order they are scheduled.
|
||||
|
||||
ASAP provides a fast event queue that will execute tasks until it is
|
||||
empty before yielding to the JavaScript engine's underlying event-loop.
|
||||
When a task gets added to a previously empty event queue, ASAP schedules a flush
|
||||
event, preferring for that event to occur before the JavaScript engine has an
|
||||
opportunity to perform IO tasks or rendering, thus making the first task and
|
||||
subsequent tasks semantically indistinguishable.
|
||||
ASAP uses a variety of techniques to preserve this invariant on different
|
||||
versions of browsers and Node.js.
|
||||
|
||||
By design, ASAP prevents input events from being handled until the task
|
||||
queue is empty.
|
||||
If the process is busy enough, this may cause incoming connection requests to be
|
||||
dropped, and may cause existing connections to inform the sender to reduce the
|
||||
transmission rate or stall.
|
||||
ASAP allows this on the theory that, if there is enough work to do, there is no
|
||||
sense in looking for trouble.
|
||||
As a consequence, ASAP can interfere with smooth animation.
|
||||
If your task should be tied to the rendering loop, consider using
|
||||
`requestAnimationFrame` instead.
|
||||
A long sequence of tasks can also effect the long running script dialog.
|
||||
If this is a problem, you may be able to use ASAP’s cousin `setImmediate` to
|
||||
break long processes into shorter intervals and periodically allow the browser
|
||||
to breathe.
|
||||
`setImmediate` will yield for IO, reflow, and repaint events.
|
||||
It also returns a handler and can be canceled.
|
||||
For a `setImmediate` shim, consider [YuzuJS setImmediate][setImmediate].
|
||||
|
||||
[setImmediate]: https://github.com/YuzuJS/setImmediate
|
||||
|
||||
Take care.
|
||||
ASAP can sustain infinite recursive calls without warning.
|
||||
It will not halt from a stack overflow, and it will not consume unbounded
|
||||
memory.
|
||||
This is behaviorally equivalent to an infinite loop.
|
||||
Just as with infinite loops, you can monitor a Node.js process for this behavior
|
||||
with a heart-beat signal.
|
||||
As with infinite loops, a very small amount of caution goes a long way to
|
||||
avoiding problems.
|
||||
|
||||
```javascript
|
||||
function loop() {
|
||||
asap(loop);
|
||||
}
|
||||
loop();
|
||||
```
|
||||
|
||||
In browsers, if a task throws an exception, it will not interrupt the flushing
|
||||
of high-priority tasks.
|
||||
The exception will be postponed to a later, low-priority event to avoid
|
||||
slow-downs.
|
||||
In Node.js, if a task throws an exception, ASAP will resume flushing only if—and
|
||||
only after—the error is handled by `domain.on("error")` or
|
||||
`process.on("uncaughtException")`.
|
||||
|
||||
## Raw ASAP
|
||||
|
||||
Checking for exceptions comes at a cost.
|
||||
The package also provides an `asap/raw` module that exports the underlying
|
||||
implementation which is faster but stalls if a task throws an exception.
|
||||
This internal version of the ASAP function does not check for errors.
|
||||
If a task does throw an error, it will stall the event queue unless you manually
|
||||
call `rawAsap.requestFlush()` before throwing the error, or any time after.
|
||||
|
||||
In Node.js, `asap/raw` also runs all tasks outside any domain.
|
||||
If you need a task to be bound to your domain, you will have to do it manually.
|
||||
|
||||
```js
|
||||
if (process.domain) {
|
||||
task = process.domain.bind(task);
|
||||
}
|
||||
rawAsap(task);
|
||||
```
|
||||
|
||||
## Tasks
|
||||
|
||||
A task may be any object that implements `call()`.
|
||||
A function will suffice, but closures tend not to be reusable and can cause
|
||||
garbage collector churn.
|
||||
Both `asap` and `rawAsap` accept task objects to give you the option of
|
||||
recycling task objects or using higher callable object abstractions.
|
||||
See the `asap` source for an illustration.
|
||||
|
||||
|
||||
## Compatibility
|
||||
|
||||
ASAP is tested on Node.js v0.10 and in a broad spectrum of web browsers.
|
||||
The following charts capture the browser test results for the most recent
|
||||
release.
|
||||
The first chart shows test results for ASAP running in the main window context.
|
||||
The second chart shows test results for ASAP running in a web worker context.
|
||||
Test results are inconclusive (grey) on browsers that do not support web
|
||||
workers.
|
||||
These data are captured automatically by [Continuous
|
||||
Integration][].
|
||||
|
||||
[Continuous Integration]: https://github.com/kriskowal/asap/blob/master/CONTRIBUTING.md
|
||||
|
||||
![Browser Compatibility](http://kriskowal-asap.s3-website-us-west-2.amazonaws.com/train/integration-2/saucelabs-results-matrix.svg)
|
||||
|
||||
![Compatibility in Web Workers](http://kriskowal-asap.s3-website-us-west-2.amazonaws.com/train/integration-2/saucelabs-worker-results-matrix.svg)
|
||||
|
||||
## Caveats
|
||||
|
||||
When a task is added to an empty event queue, it is not always possible to
|
||||
guarantee that the task queue will begin flushing immediately after the current
|
||||
event.
|
||||
However, once the task queue begins flushing, it will not yield until the queue
|
||||
is empty, even if the queue grows while executing tasks.
|
||||
|
||||
The following browsers allow the use of [DOM mutation observers][] to access
|
||||
the HTML [microtask queue][], and thus begin flushing ASAP's task queue
|
||||
immediately at the end of the current event loop turn, before any rendering or
|
||||
IO:
|
||||
|
||||
[microtask queue]: http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#microtask-queue
|
||||
[DOM mutation observers]: http://dom.spec.whatwg.org/#mutation-observers
|
||||
|
||||
- Android 4–4.3
|
||||
- Chrome 26–34
|
||||
- Firefox 14–29
|
||||
- Internet Explorer 11
|
||||
- iPad Safari 6–7.1
|
||||
- iPhone Safari 7–7.1
|
||||
- Safari 6–7
|
||||
|
||||
In the absense of mutation observers, there are a few browsers, and situations
|
||||
like web workers in some of the above browsers, where [message channels][]
|
||||
would be a useful way to avoid falling back to timers.
|
||||
Message channels give direct access to the HTML [task queue][], so the ASAP
|
||||
task queue would flush after any already queued rendering and IO tasks, but
|
||||
without having the minimum delay imposed by timers.
|
||||
However, among these browsers, Internet Explorer 10 and Safari do not reliably
|
||||
dispatch messages, so they are not worth the trouble to implement.
|
||||
|
||||
[message channels]: http://www.whatwg.org/specs/web-apps/current-work/multipage/web-messaging.html#message-channels
|
||||
[task queue]: http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#concept-task
|
||||
|
||||
- Internet Explorer 10
|
||||
- Safair 5.0-1
|
||||
- Opera 11-12
|
||||
|
||||
In the absense of mutation observers, these browsers and the following browsers
|
||||
all fall back to using `setTimeout` and `setInterval` to ensure that a `flush`
|
||||
occurs.
|
||||
The implementation uses both and cancels whatever handler loses the race, since
|
||||
`setTimeout` tends to occasionally skip tasks in unisolated circumstances.
|
||||
Timers generally delay the flushing of ASAP's task queue for four milliseconds.
|
||||
|
||||
- Firefox 3–13
|
||||
- Internet Explorer 6–10
|
||||
- iPad Safari 4.3
|
||||
- Lynx 2.8.7
|
||||
|
||||
|
||||
## Heritage
|
||||
|
||||
ASAP has been factored out of the [Q][] asynchronous promise library.
|
||||
It originally had a naïve implementation in terms of `setTimeout`, but
|
||||
[Malte Ubl][NonBlocking] provided an insight that `postMessage` might be
|
||||
useful for creating a high-priority, no-delay event dispatch hack.
|
||||
Since then, Internet Explorer proposed and implemented `setImmediate`.
|
||||
Robert Katić began contributing to Q by measuring the performance of
|
||||
the internal implementation of `asap`, paying particular attention to
|
||||
error recovery.
|
||||
Domenic, Robert, and Kris Kowal collectively settled on the current strategy of
|
||||
unrolling the high-priority event queue internally regardless of what strategy
|
||||
we used to dispatch the potentially lower-priority flush event.
|
||||
Domenic went on to make ASAP cooperate with Node.js domains.
|
||||
|
||||
[Q]: https://github.com/kriskowal/q
|
||||
[NonBlocking]: http://www.nonblocking.io/2011/06/windownexttick.html
|
||||
|
||||
For further reading, Nicholas Zakas provided a thorough article on [The
|
||||
Case for setImmediate][NCZ].
|
||||
|
||||
[NCZ]: http://www.nczonline.net/blog/2013/07/09/the-case-for-setimmediate/
|
||||
|
||||
Ember’s RSVP promise implementation later [adopted][RSVP ASAP] the name ASAP but
|
||||
further developed the implentation.
|
||||
Particularly, The `MessagePort` implementation was abandoned due to interaction
|
||||
[problems with Mobile Internet Explorer][IE Problems] in favor of an
|
||||
implementation backed on the newer and more reliable DOM `MutationObserver`
|
||||
interface.
|
||||
These changes were back-ported into this library.
|
||||
|
||||
[IE Problems]: https://github.com/cujojs/when/issues/197
|
||||
[RSVP ASAP]: https://github.com/tildeio/rsvp.js/blob/cddf7232546a9cf858524b75cde6f9edf72620a7/lib/rsvp/asap.js
|
||||
|
||||
In addition, ASAP factored into `asap` and `asap/raw`, such that `asap` remained
|
||||
exception-safe, but `asap/raw` provided a tight kernel that could be used for
|
||||
tasks that guaranteed that they would not throw exceptions.
|
||||
This core is useful for promise implementations that capture thrown errors in
|
||||
rejected promises and do not need a second safety net.
|
||||
At the same time, the exception handling in `asap` was factored into separate
|
||||
implementations for Node.js and browsers, using the the [Browserify][Browser
|
||||
Config] `browser` property in `package.json` to instruct browser module loaders
|
||||
and bundlers, including [Browserify][], [Mr][], and [Mop][], to use the
|
||||
browser-only implementation.
|
||||
|
||||
[Browser Config]: https://gist.github.com/defunctzombie/4339901
|
||||
[Browserify]: https://github.com/substack/node-browserify
|
||||
[Mr]: https://github.com/montagejs/mr
|
||||
[Mop]: https://github.com/montagejs/mop
|
||||
|
||||
## License
|
||||
|
||||
Copyright 2009-2014 by Contributors
|
||||
MIT License (enclosed)
|
||||
|
65
node_modules/asap/asap.js
generated
vendored
|
@ -1,65 +0,0 @@
|
|||
"use strict";
|
||||
|
||||
var rawAsap = require("./raw");
|
||||
var freeTasks = [];
|
||||
|
||||
/**
|
||||
* Calls a task as soon as possible after returning, in its own event, with
|
||||
* priority over IO events. An exception thrown in a task can be handled by
|
||||
* `process.on("uncaughtException") or `domain.on("error")`, but will otherwise
|
||||
* crash the process. If the error is handled, all subsequent tasks will
|
||||
* resume.
|
||||
*
|
||||
* @param {{call}} task A callable object, typically a function that takes no
|
||||
* arguments.
|
||||
*/
|
||||
module.exports = asap;
|
||||
function asap(task) {
|
||||
var rawTask;
|
||||
if (freeTasks.length) {
|
||||
rawTask = freeTasks.pop();
|
||||
} else {
|
||||
rawTask = new RawTask();
|
||||
}
|
||||
rawTask.task = task;
|
||||
rawTask.domain = process.domain;
|
||||
rawAsap(rawTask);
|
||||
}
|
||||
|
||||
function RawTask() {
|
||||
this.task = null;
|
||||
this.domain = null;
|
||||
}
|
||||
|
||||
RawTask.prototype.call = function () {
|
||||
if (this.domain) {
|
||||
this.domain.enter();
|
||||
}
|
||||
var threw = true;
|
||||
try {
|
||||
this.task.call();
|
||||
threw = false;
|
||||
// If the task throws an exception (presumably) Node.js restores the
|
||||
// domain stack for the next event.
|
||||
if (this.domain) {
|
||||
this.domain.exit();
|
||||
}
|
||||
} finally {
|
||||
// We use try/finally and a threw flag to avoid messing up stack traces
|
||||
// when we catch and release errors.
|
||||
if (threw) {
|
||||
// In Node.js, uncaught exceptions are considered fatal errors.
|
||||
// Re-throw them to interrupt flushing!
|
||||
// Ensure that flushing continues if an uncaught exception is
|
||||
// suppressed listening process.on("uncaughtException") or
|
||||
// domain.on("error").
|
||||
rawAsap.requestFlush();
|
||||
}
|
||||
// If the task threw an error, we do not want to exit the domain here.
|
||||
// Exiting the domain would prevent the domain from catching the error.
|
||||
this.task = null;
|
||||
this.domain = null;
|
||||
freeTasks.push(this);
|
||||
}
|
||||
};
|
||||
|
66
node_modules/asap/browser-asap.js
generated
vendored
|
@ -1,66 +0,0 @@
|
|||
"use strict";
|
||||
|
||||
// rawAsap provides everything we need except exception management.
|
||||
var rawAsap = require("./raw");
|
||||
// RawTasks are recycled to reduce GC churn.
|
||||
var freeTasks = [];
|
||||
// We queue errors to ensure they are thrown in right order (FIFO).
|
||||
// Array-as-queue is good enough here, since we are just dealing with exceptions.
|
||||
var pendingErrors = [];
|
||||
var requestErrorThrow = rawAsap.makeRequestCallFromTimer(throwFirstError);
|
||||
|
||||
function throwFirstError() {
|
||||
if (pendingErrors.length) {
|
||||
throw pendingErrors.shift();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Calls a task as soon as possible after returning, in its own event, with priority
|
||||
* over other events like animation, reflow, and repaint. An error thrown from an
|
||||
* event will not interrupt, nor even substantially slow down the processing of
|
||||
* other events, but will be rather postponed to a lower priority event.
|
||||
* @param {{call}} task A callable object, typically a function that takes no
|
||||
* arguments.
|
||||
*/
|
||||
module.exports = asap;
|
||||
function asap(task) {
|
||||
var rawTask;
|
||||
if (freeTasks.length) {
|
||||
rawTask = freeTasks.pop();
|
||||
} else {
|
||||
rawTask = new RawTask();
|
||||
}
|
||||
rawTask.task = task;
|
||||
rawAsap(rawTask);
|
||||
}
|
||||
|
||||
// We wrap tasks with recyclable task objects. A task object implements
|
||||
// `call`, just like a function.
|
||||
function RawTask() {
|
||||
this.task = null;
|
||||
}
|
||||
|
||||
// The sole purpose of wrapping the task is to catch the exception and recycle
|
||||
// the task object after its single use.
|
||||
RawTask.prototype.call = function () {
|
||||
try {
|
||||
this.task.call();
|
||||
} catch (error) {
|
||||
if (asap.onerror) {
|
||||
// This hook exists purely for testing purposes.
|
||||
// Its name will be periodically randomized to break any code that
|
||||
// depends on its existence.
|
||||
asap.onerror(error);
|
||||
} else {
|
||||
// In a web browser, exceptions are not fatal. However, to avoid
|
||||
// slowing down the queue of pending tasks, we rethrow the error in a
|
||||
// lower priority turn.
|
||||
pendingErrors.push(error);
|
||||
requestErrorThrow();
|
||||
}
|
||||
} finally {
|
||||
this.task = null;
|
||||
freeTasks[freeTasks.length] = this;
|
||||
}
|
||||
};
|
223
node_modules/asap/browser-raw.js
generated
vendored
|
@ -1,223 +0,0 @@
|
|||
"use strict";
|
||||
|
||||
// Use the fastest means possible to execute a task in its own turn, with
|
||||
// priority over other events including IO, animation, reflow, and redraw
|
||||
// events in browsers.
|
||||
//
|
||||
// An exception thrown by a task will permanently interrupt the processing of
|
||||
// subsequent tasks. The higher level `asap` function ensures that if an
|
||||
// exception is thrown by a task, that the task queue will continue flushing as
|
||||
// soon as possible, but if you use `rawAsap` directly, you are responsible to
|
||||
// either ensure that no exceptions are thrown from your task, or to manually
|
||||
// call `rawAsap.requestFlush` if an exception is thrown.
|
||||
module.exports = rawAsap;
|
||||
function rawAsap(task) {
|
||||
if (!queue.length) {
|
||||
requestFlush();
|
||||
flushing = true;
|
||||
}
|
||||
// Equivalent to push, but avoids a function call.
|
||||
queue[queue.length] = task;
|
||||
}
|
||||
|
||||
var queue = [];
|
||||
// Once a flush has been requested, no further calls to `requestFlush` are
|
||||
// necessary until the next `flush` completes.
|
||||
var flushing = false;
|
||||
// `requestFlush` is an implementation-specific method that attempts to kick
|
||||
// off a `flush` event as quickly as possible. `flush` will attempt to exhaust
|
||||
// the event queue before yielding to the browser's own event loop.
|
||||
var requestFlush;
|
||||
// The position of the next task to execute in the task queue. This is
|
||||
// preserved between calls to `flush` so that it can be resumed if
|
||||
// a task throws an exception.
|
||||
var index = 0;
|
||||
// If a task schedules additional tasks recursively, the task queue can grow
|
||||
// unbounded. To prevent memory exhaustion, the task queue will periodically
|
||||
// truncate already-completed tasks.
|
||||
var capacity = 1024;
|
||||
|
||||
// The flush function processes all tasks that have been scheduled with
|
||||
// `rawAsap` unless and until one of those tasks throws an exception.
|
||||
// If a task throws an exception, `flush` ensures that its state will remain
|
||||
// consistent and will resume where it left off when called again.
|
||||
// However, `flush` does not make any arrangements to be called again if an
|
||||
// exception is thrown.
|
||||
function flush() {
|
||||
while (index < queue.length) {
|
||||
var currentIndex = index;
|
||||
// Advance the index before calling the task. This ensures that we will
|
||||
// begin flushing on the next task the task throws an error.
|
||||
index = index + 1;
|
||||
queue[currentIndex].call();
|
||||
// Prevent leaking memory for long chains of recursive calls to `asap`.
|
||||
// If we call `asap` within tasks scheduled by `asap`, the queue will
|
||||
// grow, but to avoid an O(n) walk for every task we execute, we don't
|
||||
// shift tasks off the queue after they have been executed.
|
||||
// Instead, we periodically shift 1024 tasks off the queue.
|
||||
if (index > capacity) {
|
||||
// Manually shift all values starting at the index back to the
|
||||
// beginning of the queue.
|
||||
for (var scan = 0, newLength = queue.length - index; scan < newLength; scan++) {
|
||||
queue[scan] = queue[scan + index];
|
||||
}
|
||||
queue.length -= index;
|
||||
index = 0;
|
||||
}
|
||||
}
|
||||
queue.length = 0;
|
||||
index = 0;
|
||||
flushing = false;
|
||||
}
|
||||
|
||||
// `requestFlush` is implemented using a strategy based on data collected from
|
||||
// every available SauceLabs Selenium web driver worker at time of writing.
|
||||
// https://docs.google.com/spreadsheets/d/1mG-5UYGup5qxGdEMWkhP6BWCz053NUb2E1QoUTU16uA/edit#gid=783724593
|
||||
|
||||
// Safari 6 and 6.1 for desktop, iPad, and iPhone are the only browsers that
|
||||
// have WebKitMutationObserver but not un-prefixed MutationObserver.
|
||||
// Must use `global` or `self` instead of `window` to work in both frames and web
|
||||
// workers. `global` is a provision of Browserify, Mr, Mrs, or Mop.
|
||||
|
||||
/* globals self */
|
||||
var scope = typeof global !== "undefined" ? global : self;
|
||||
var BrowserMutationObserver = scope.MutationObserver || scope.WebKitMutationObserver;
|
||||
|
||||
// MutationObservers are desirable because they have high priority and work
|
||||
// reliably everywhere they are implemented.
|
||||
// They are implemented in all modern browsers.
|
||||
//
|
||||
// - Android 4-4.3
|
||||
// - Chrome 26-34
|
||||
// - Firefox 14-29
|
||||
// - Internet Explorer 11
|
||||
// - iPad Safari 6-7.1
|
||||
// - iPhone Safari 7-7.1
|
||||
// - Safari 6-7
|
||||
if (typeof BrowserMutationObserver === "function") {
|
||||
requestFlush = makeRequestCallFromMutationObserver(flush);
|
||||
|
||||
// MessageChannels are desirable because they give direct access to the HTML
|
||||
// task queue, are implemented in Internet Explorer 10, Safari 5.0-1, and Opera
|
||||
// 11-12, and in web workers in many engines.
|
||||
// Although message channels yield to any queued rendering and IO tasks, they
|
||||
// would be better than imposing the 4ms delay of timers.
|
||||
// However, they do not work reliably in Internet Explorer or Safari.
|
||||
|
||||
// Internet Explorer 10 is the only browser that has setImmediate but does
|
||||
// not have MutationObservers.
|
||||
// Although setImmediate yields to the browser's renderer, it would be
|
||||
// preferrable to falling back to setTimeout since it does not have
|
||||
// the minimum 4ms penalty.
|
||||
// Unfortunately there appears to be a bug in Internet Explorer 10 Mobile (and
|
||||
// Desktop to a lesser extent) that renders both setImmediate and
|
||||
// MessageChannel useless for the purposes of ASAP.
|
||||
// https://github.com/kriskowal/q/issues/396
|
||||
|
||||
// Timers are implemented universally.
|
||||
// We fall back to timers in workers in most engines, and in foreground
|
||||
// contexts in the following browsers.
|
||||
// However, note that even this simple case requires nuances to operate in a
|
||||
// broad spectrum of browsers.
|
||||
//
|
||||
// - Firefox 3-13
|
||||
// - Internet Explorer 6-9
|
||||
// - iPad Safari 4.3
|
||||
// - Lynx 2.8.7
|
||||
} else {
|
||||
requestFlush = makeRequestCallFromTimer(flush);
|
||||
}
|
||||
|
||||
// `requestFlush` requests that the high priority event queue be flushed as
|
||||
// soon as possible.
|
||||
// This is useful to prevent an error thrown in a task from stalling the event
|
||||
// queue if the exception handled by Node.js’s
|
||||
// `process.on("uncaughtException")` or by a domain.
|
||||
rawAsap.requestFlush = requestFlush;
|
||||
|
||||
// To request a high priority event, we induce a mutation observer by toggling
|
||||
// the text of a text node between "1" and "-1".
|
||||
function makeRequestCallFromMutationObserver(callback) {
|
||||
var toggle = 1;
|
||||
var observer = new BrowserMutationObserver(callback);
|
||||
var node = document.createTextNode("");
|
||||
observer.observe(node, {characterData: true});
|
||||
return function requestCall() {
|
||||
toggle = -toggle;
|
||||
node.data = toggle;
|
||||
};
|
||||
}
|
||||
|
||||
// The message channel technique was discovered by Malte Ubl and was the
|
||||
// original foundation for this library.
|
||||
// http://www.nonblocking.io/2011/06/windownexttick.html
|
||||
|
||||
// Safari 6.0.5 (at least) intermittently fails to create message ports on a
|
||||
// page's first load. Thankfully, this version of Safari supports
|
||||
// MutationObservers, so we don't need to fall back in that case.
|
||||
|
||||
// function makeRequestCallFromMessageChannel(callback) {
|
||||
// var channel = new MessageChannel();
|
||||
// channel.port1.onmessage = callback;
|
||||
// return function requestCall() {
|
||||
// channel.port2.postMessage(0);
|
||||
// };
|
||||
// }
|
||||
|
||||
// For reasons explained above, we are also unable to use `setImmediate`
|
||||
// under any circumstances.
|
||||
// Even if we were, there is another bug in Internet Explorer 10.
|
||||
// It is not sufficient to assign `setImmediate` to `requestFlush` because
|
||||
// `setImmediate` must be called *by name* and therefore must be wrapped in a
|
||||
// closure.
|
||||
// Never forget.
|
||||
|
||||
// function makeRequestCallFromSetImmediate(callback) {
|
||||
// return function requestCall() {
|
||||
// setImmediate(callback);
|
||||
// };
|
||||
// }
|
||||
|
||||
// Safari 6.0 has a problem where timers will get lost while the user is
|
||||
// scrolling. This problem does not impact ASAP because Safari 6.0 supports
|
||||
// mutation observers, so that implementation is used instead.
|
||||
// However, if we ever elect to use timers in Safari, the prevalent work-around
|
||||
// is to add a scroll event listener that calls for a flush.
|
||||
|
||||
// `setTimeout` does not call the passed callback if the delay is less than
|
||||
// approximately 7 in web workers in Firefox 8 through 18, and sometimes not
|
||||
// even then.
|
||||
|
||||
function makeRequestCallFromTimer(callback) {
|
||||
return function requestCall() {
|
||||
// We dispatch a timeout with a specified delay of 0 for engines that
|
||||
// can reliably accommodate that request. This will usually be snapped
|
||||
// to a 4 milisecond delay, but once we're flushing, there's no delay
|
||||
// between events.
|
||||
var timeoutHandle = setTimeout(handleTimer, 0);
|
||||
// However, since this timer gets frequently dropped in Firefox
|
||||
// workers, we enlist an interval handle that will try to fire
|
||||
// an event 20 times per second until it succeeds.
|
||||
var intervalHandle = setInterval(handleTimer, 50);
|
||||
|
||||
function handleTimer() {
|
||||
// Whichever timer succeeds will cancel both timers and
|
||||
// execute the callback.
|
||||
clearTimeout(timeoutHandle);
|
||||
clearInterval(intervalHandle);
|
||||
callback();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// This is for `asap.js` only.
|
||||
// Its name will be periodically randomized to break any code that depends on
|
||||
// its existence.
|
||||
rawAsap.makeRequestCallFromTimer = makeRequestCallFromTimer;
|
||||
|
||||
// ASAP was originally a nextTick shim included in Q. This was factored out
|
||||
// into this ASAP package. It was later adapted to RSVP which made further
|
||||
// amendments. These decisions, particularly to marginalize MessageChannel and
|
||||
// to capture the MutationObserver implementation in a closure, were integrated
|
||||
// back into ASAP proper.
|
||||
// https://github.com/tildeio/rsvp.js/blob/cddf7232546a9cf858524b75cde6f9edf72620a7/lib/rsvp/asap.js
|
58
node_modules/asap/package.json
generated
vendored
|
@ -1,58 +0,0 @@
|
|||
{
|
||||
"name": "asap",
|
||||
"version": "2.0.6",
|
||||
"description": "High-priority task queue for Node.js and browsers",
|
||||
"keywords": [
|
||||
"event",
|
||||
"task",
|
||||
"queue"
|
||||
],
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/kriskowal/asap.git"
|
||||
},
|
||||
"main": "./asap.js",
|
||||
"browser": {
|
||||
"./asap": "./browser-asap.js",
|
||||
"./asap.js": "./browser-asap.js",
|
||||
"./raw": "./browser-raw.js",
|
||||
"./raw.js": "./browser-raw.js",
|
||||
"./test/domain.js": "./test/browser-domain.js"
|
||||
},
|
||||
"react-native": {
|
||||
"domain": false
|
||||
},
|
||||
"files": [
|
||||
"raw.js",
|
||||
"asap.js",
|
||||
"browser-raw.js",
|
||||
"browser-asap.js"
|
||||
],
|
||||
"scripts": {
|
||||
"test": "npm run lint && npm run test-node",
|
||||
"test-travis": "npm run lint && npm run test-node && npm run test-saucelabs && npm run test-saucelabs-worker",
|
||||
"test-node": "node test/asap-test.js",
|
||||
"test-publish": "node scripts/publish-bundle.js test/asap-test.js | pbcopy",
|
||||
"test-browser": "node scripts/publish-bundle.js test/asap-test.js | xargs opener",
|
||||
"test-saucelabs": "node scripts/saucelabs.js test/asap-test.js scripts/saucelabs-spot-configurations.json",
|
||||
"test-saucelabs-all": "node scripts/saucelabs.js test/asap-test.js scripts/saucelabs-all-configurations.json",
|
||||
"test-saucelabs-worker": "node scripts/saucelabs-worker-test.js scripts/saucelabs-spot-configurations.json",
|
||||
"test-saucelabs-worker-all": "node scripts/saucelabs-worker-test.js scripts/saucelabs-all-configurations.json",
|
||||
"lint": "jshint raw.js asap.js browser-raw.js browser-asap.js $(find scripts -name '*.js' | grep -v gauntlet)",
|
||||
"benchmarks": "node benchmarks"
|
||||
},
|
||||
"devDependencies": {
|
||||
"events": "^1.0.1",
|
||||
"jshint": "^2.5.1",
|
||||
"knox": "^0.8.10",
|
||||
"mr": "^2.0.5",
|
||||
"opener": "^1.3.0",
|
||||
"q": "^2.0.3",
|
||||
"q-io": "^2.0.3",
|
||||
"saucelabs": "^0.1.1",
|
||||
"wd": "^0.2.21",
|
||||
"weak-map": "^1.0.5",
|
||||
"benchmark": "^1.0.0"
|
||||
}
|
||||
}
|
101
node_modules/asap/raw.js
generated
vendored
|
@ -1,101 +0,0 @@
|
|||
"use strict";
|
||||
|
||||
var domain; // The domain module is executed on demand
|
||||
var hasSetImmediate = typeof setImmediate === "function";
|
||||
|
||||
// Use the fastest means possible to execute a task in its own turn, with
|
||||
// priority over other events including network IO events in Node.js.
|
||||
//
|
||||
// An exception thrown by a task will permanently interrupt the processing of
|
||||
// subsequent tasks. The higher level `asap` function ensures that if an
|
||||
// exception is thrown by a task, that the task queue will continue flushing as
|
||||
// soon as possible, but if you use `rawAsap` directly, you are responsible to
|
||||
// either ensure that no exceptions are thrown from your task, or to manually
|
||||
// call `rawAsap.requestFlush` if an exception is thrown.
|
||||
module.exports = rawAsap;
|
||||
function rawAsap(task) {
|
||||
if (!queue.length) {
|
||||
requestFlush();
|
||||
flushing = true;
|
||||
}
|
||||
// Avoids a function call
|
||||
queue[queue.length] = task;
|
||||
}
|
||||
|
||||
var queue = [];
|
||||
// Once a flush has been requested, no further calls to `requestFlush` are
|
||||
// necessary until the next `flush` completes.
|
||||
var flushing = false;
|
||||
// The position of the next task to execute in the task queue. This is
|
||||
// preserved between calls to `flush` so that it can be resumed if
|
||||
// a task throws an exception.
|
||||
var index = 0;
|
||||
// If a task schedules additional tasks recursively, the task queue can grow
|
||||
// unbounded. To prevent memory excaustion, the task queue will periodically
|
||||
// truncate already-completed tasks.
|
||||
var capacity = 1024;
|
||||
|
||||
// The flush function processes all tasks that have been scheduled with
|
||||
// `rawAsap` unless and until one of those tasks throws an exception.
|
||||
// If a task throws an exception, `flush` ensures that its state will remain
|
||||
// consistent and will resume where it left off when called again.
|
||||
// However, `flush` does not make any arrangements to be called again if an
|
||||
// exception is thrown.
|
||||
function flush() {
|
||||
while (index < queue.length) {
|
||||
var currentIndex = index;
|
||||
// Advance the index before calling the task. This ensures that we will
|
||||
// begin flushing on the next task the task throws an error.
|
||||
index = index + 1;
|
||||
queue[currentIndex].call();
|
||||
// Prevent leaking memory for long chains of recursive calls to `asap`.
|
||||
// If we call `asap` within tasks scheduled by `asap`, the queue will
|
||||
// grow, but to avoid an O(n) walk for every task we execute, we don't
|
||||
// shift tasks off the queue after they have been executed.
|
||||
// Instead, we periodically shift 1024 tasks off the queue.
|
||||
if (index > capacity) {
|
||||
// Manually shift all values starting at the index back to the
|
||||
// beginning of the queue.
|
||||
for (var scan = 0, newLength = queue.length - index; scan < newLength; scan++) {
|
||||
queue[scan] = queue[scan + index];
|
||||
}
|
||||
queue.length -= index;
|
||||
index = 0;
|
||||
}
|
||||
}
|
||||
queue.length = 0;
|
||||
index = 0;
|
||||
flushing = false;
|
||||
}
|
||||
|
||||
rawAsap.requestFlush = requestFlush;
|
||||
function requestFlush() {
|
||||
// Ensure flushing is not bound to any domain.
|
||||
// It is not sufficient to exit the domain, because domains exist on a stack.
|
||||
// To execute code outside of any domain, the following dance is necessary.
|
||||
var parentDomain = process.domain;
|
||||
if (parentDomain) {
|
||||
if (!domain) {
|
||||
// Lazy execute the domain module.
|
||||
// Only employed if the user elects to use domains.
|
||||
domain = require("domain");
|
||||
}
|
||||
domain.active = process.domain = null;
|
||||
}
|
||||
|
||||
// `setImmediate` is slower that `process.nextTick`, but `process.nextTick`
|
||||
// cannot handle recursion.
|
||||
// `requestFlush` will only be called recursively from `asap.js`, to resume
|
||||
// flushing after an error is thrown into a domain.
|
||||
// Conveniently, `setImmediate` was introduced in the same version
|
||||
// `process.nextTick` started throwing recursion errors.
|
||||
if (flushing && hasSetImmediate) {
|
||||
setImmediate(flush);
|
||||
} else {
|
||||
process.nextTick(flush);
|
||||
}
|
||||
|
||||
if (parentDomain) {
|
||||
domain.active = process.domain = parentDomain;
|
||||
}
|
||||
}
|
145
node_modules/asn1.js-rfc2560/index.js
generated
vendored
|
@ -1,145 +0,0 @@
|
|||
var asn1 = require('asn1.js');
|
||||
var rfc5280 = require('asn1.js-rfc5280');
|
||||
|
||||
var OCSPRequest = asn1.define('OCSPRequest', function() {
|
||||
this.seq().obj(
|
||||
this.key('tbsRequest').use(TBSRequest),
|
||||
this.key('optionalSignature').optional().explicit(0).use(Signature)
|
||||
);
|
||||
});
|
||||
exports.OCSPRequest = OCSPRequest;
|
||||
|
||||
var TBSRequest = asn1.define('TBSRequest', function() {
|
||||
this.seq().obj(
|
||||
this.key('version').def('v1').explicit(0).use(rfc5280.Version),
|
||||
this.key('requestorName').optional().explicit(1).use(rfc5280.GeneralName),
|
||||
this.key('requestList').seqof(Request),
|
||||
this.key('requestExtensions').optional().explicit(2)
|
||||
.seqof(rfc5280.Extension)
|
||||
);
|
||||
});
|
||||
exports.TBSRequest = TBSRequest;
|
||||
|
||||
var Signature = asn1.define('Signature', function() {
|
||||
this.seq().obj(
|
||||
this.key('signatureAlgorithm').use(rfc5280.AlgorithmIdentifier),
|
||||
this.key('signature').bitstr(),
|
||||
this.key('certs').optional().explicit(0).seqof(rfc5280.Certificate)
|
||||
);
|
||||
});
|
||||
exports.Signature = Signature;
|
||||
|
||||
var Request = asn1.define('Request', function() {
|
||||
this.seq().obj(
|
||||
this.key('reqCert').use(CertID),
|
||||
this.key('singleRequestExtensions').optional().explicit(0).seqof(
|
||||
rfc5280.Extension)
|
||||
);
|
||||
});
|
||||
exports.Request = Request;
|
||||
|
||||
var OCSPResponse = asn1.define('OCSPResponse', function() {
|
||||
this.seq().obj(
|
||||
this.key('responseStatus').use(ResponseStatus),
|
||||
this.key('responseBytes').optional().explicit(0).seq().obj(
|
||||
this.key('responseType').objid({
|
||||
'1 3 6 1 5 5 7 48 1 1': 'id-pkix-ocsp-basic'
|
||||
}),
|
||||
this.key('response').octstr()
|
||||
)
|
||||
);
|
||||
});
|
||||
exports.OCSPResponse = OCSPResponse;
|
||||
|
||||
var ResponseStatus = asn1.define('ResponseStatus', function() {
|
||||
this.enum({
|
||||
0: 'successful',
|
||||
1: 'malformed_request',
|
||||
2: 'internal_error',
|
||||
3: 'try_later',
|
||||
5: 'sig_required',
|
||||
6: 'unauthorized'
|
||||
});
|
||||
});
|
||||
exports.ResponseStatus = ResponseStatus;
|
||||
|
||||
var BasicOCSPResponse = asn1.define('BasicOCSPResponse', function() {
|
||||
this.seq().obj(
|
||||
this.key('tbsResponseData').use(ResponseData),
|
||||
this.key('signatureAlgorithm').use(rfc5280.AlgorithmIdentifier),
|
||||
this.key('signature').bitstr(),
|
||||
this.key('certs').optional().explicit(0).seqof(rfc5280.Certificate)
|
||||
);
|
||||
});
|
||||
exports.BasicOCSPResponse = BasicOCSPResponse;
|
||||
|
||||
var ResponseData = asn1.define('ResponseData', function() {
|
||||
this.seq().obj(
|
||||
this.key('version').def('v1').explicit(0).use(rfc5280.Version),
|
||||
this.key('responderID').use(ResponderID),
|
||||
this.key('producedAt').gentime(),
|
||||
this.key('responses').seqof(SingleResponse),
|
||||
this.key('responseExtensions').optional().explicit(0)
|
||||
.seqof(rfc5280.Extension)
|
||||
);
|
||||
});
|
||||
exports.ResponseData = ResponseData;
|
||||
|
||||
var ResponderID = asn1.define('ResponderId', function() {
|
||||
this.choice({
|
||||
byName: this.explicit(1).use(rfc5280.Name),
|
||||
byKey: this.explicit(2).use(KeyHash)
|
||||
});
|
||||
});
|
||||
exports.ResponderID = ResponderID;
|
||||
|
||||
var KeyHash = asn1.define('KeyHash', function() {
|
||||
this.octstr();
|
||||
});
|
||||
exports.KeyHash = KeyHash;
|
||||
|
||||
var SingleResponse = asn1.define('SingleResponse', function() {
|
||||
this.seq().obj(
|
||||
this.key('certId').use(CertID),
|
||||
this.key('certStatus').use(CertStatus),
|
||||
this.key('thisUpdate').gentime(),
|
||||
this.key('nextUpdate').optional().explicit(0).gentime(),
|
||||
this.key('singleExtensions').optional().explicit(1).seqof(rfc5280.Extension)
|
||||
);
|
||||
});
|
||||
exports.SingleResponse = SingleResponse;
|
||||
|
||||
var CertStatus = asn1.define('CertStatus', function() {
|
||||
this.choice({
|
||||
good: this.implicit(0).null_(),
|
||||
revoked: this.implicit(1).use(RevokedInfo),
|
||||
unknown: this.implicit(2).null_()
|
||||
});
|
||||
});
|
||||
exports.CertStatus = CertStatus;
|
||||
|
||||
var RevokedInfo = asn1.define('RevokedInfo', function() {
|
||||
this.seq().obj(
|
||||
this.key('revocationTime').gentime(),
|
||||
this.key('revocationReason').optional().explicit(0).use(rfc5280.ReasonCode)
|
||||
);
|
||||
});
|
||||
exports.RevokedInfo = RevokedInfo;
|
||||
|
||||
var CertID = asn1.define('CertID', function() {
|
||||
this.seq().obj(
|
||||
this.key('hashAlgorithm').use(rfc5280.AlgorithmIdentifier),
|
||||
this.key('issuerNameHash').octstr(),
|
||||
this.key('issuerKeyHash').octstr(),
|
||||
this.key('serialNumber').use(rfc5280.CertificateSerialNumber)
|
||||
);
|
||||
});
|
||||
exports.CertID = CertID;
|
||||
|
||||
var Nonce = asn1.define('Nonce', function() {
|
||||
this.octstr();
|
||||
});
|
||||
exports.Nonce = Nonce;
|
||||
|
||||
exports['id-pkix-ocsp'] = [ 1, 3, 6, 1, 5, 5, 7, 48, 1 ];
|
||||
exports['id-pkix-ocsp-nonce'] = [ 1, 3, 6, 1, 5, 5, 7, 48, 1, 2 ];
|
33
node_modules/asn1.js-rfc2560/package.json
generated
vendored
|
@ -1,33 +0,0 @@
|
|||
{
|
||||
"name": "asn1.js-rfc2560",
|
||||
"version": "4.0.6",
|
||||
"description": "RFC2560 structures for asn1.js",
|
||||
"main": "index.js",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git@github.com:indutny/asn1.js"
|
||||
},
|
||||
"keywords": [
|
||||
"asn1",
|
||||
"rfc2560",
|
||||
"der"
|
||||
],
|
||||
"scripts": {
|
||||
"test": "mocha --reporter=spec test/*-test.js"
|
||||
},
|
||||
"author": "Fedor Indutny",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/indutny/asn1.js/issues"
|
||||
},
|
||||
"homepage": "https://github.com/indutny/asn1.js",
|
||||
"dependencies": {
|
||||
"asn1.js-rfc5280": "^2.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"asn1.js": "^4.4.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"mocha": "^4.0.1"
|
||||
}
|
||||
}
|
892
node_modules/asn1.js-rfc5280/index.js
generated
vendored
|
@ -1,892 +0,0 @@
|
|||
var asn1 = require('asn1.js');
|
||||
|
||||
/**
|
||||
* RFC5280 X509 and Extension Definitions
|
||||
*/
|
||||
|
||||
var rfc5280 = exports;
|
||||
|
||||
// OIDs
|
||||
var x509OIDs = {
|
||||
'2 5 29 9': 'subjectDirectoryAttributes',
|
||||
'2 5 29 14': 'subjectKeyIdentifier',
|
||||
'2 5 29 15': 'keyUsage',
|
||||
'2 5 29 17': 'subjectAlternativeName',
|
||||
'2 5 29 18': 'issuerAlternativeName',
|
||||
'2 5 29 19': 'basicConstraints',
|
||||
'2 5 29 20': 'cRLNumber',
|
||||
'2 5 29 21': 'reasonCode',
|
||||
'2 5 29 24': 'invalidityDate',
|
||||
'2 5 29 27': 'deltaCRLIndicator',
|
||||
'2 5 29 28': 'issuingDistributionPoint',
|
||||
'2 5 29 29': 'certificateIssuer',
|
||||
'2 5 29 30': 'nameConstraints',
|
||||
'2 5 29 31': 'cRLDistributionPoints',
|
||||
'2 5 29 32': 'certificatePolicies',
|
||||
'2 5 29 33': 'policyMappings',
|
||||
'2 5 29 35': 'authorityKeyIdentifier',
|
||||
'2 5 29 36': 'policyConstraints',
|
||||
'2 5 29 37': 'extendedKeyUsage',
|
||||
'2 5 29 46': 'freshestCRL',
|
||||
'2 5 29 54': 'inhibitAnyPolicy',
|
||||
'1 3 6 1 5 5 7 1 1': 'authorityInformationAccess',
|
||||
'1 3 6 1 5 5 7 11': 'subjectInformationAccess'
|
||||
};
|
||||
|
||||
// CertificateList ::= SEQUENCE {
|
||||
// tbsCertList TBSCertList,
|
||||
// signatureAlgorithm AlgorithmIdentifier,
|
||||
// signature BIT STRING }
|
||||
var CertificateList = asn1.define('CertificateList', function() {
|
||||
this.seq().obj(
|
||||
this.key('tbsCertList').use(TBSCertList),
|
||||
this.key('signatureAlgorithm').use(AlgorithmIdentifier),
|
||||
this.key('signature').bitstr()
|
||||
);
|
||||
});
|
||||
rfc5280.CertificateList = CertificateList;
|
||||
|
||||
// AlgorithmIdentifier ::= SEQUENCE {
|
||||
// algorithm OBJECT IDENTIFIER,
|
||||
// parameters ANY DEFINED BY algorithm OPTIONAL }
|
||||
var AlgorithmIdentifier = asn1.define('AlgorithmIdentifier', function() {
|
||||
this.seq().obj(
|
||||
this.key('algorithm').objid(),
|
||||
this.key('parameters').optional().any()
|
||||
);
|
||||
});
|
||||
rfc5280.AlgorithmIdentifier = AlgorithmIdentifier;
|
||||
|
||||
// Certificate ::= SEQUENCE {
|
||||
// tbsCertificate TBSCertificate,
|
||||
// signatureAlgorithm AlgorithmIdentifier,
|
||||
// signature BIT STRING }
|
||||
var Certificate = asn1.define('Certificate', function() {
|
||||
this.seq().obj(
|
||||
this.key('tbsCertificate').use(TBSCertificate),
|
||||
this.key('signatureAlgorithm').use(AlgorithmIdentifier),
|
||||
this.key('signature').bitstr()
|
||||
);
|
||||
});
|
||||
rfc5280.Certificate = Certificate;
|
||||
|
||||
// TBSCertificate ::= SEQUENCE {
|
||||
// version [0] Version DEFAULT v1,
|
||||
// serialNumber CertificateSerialNumber,
|
||||
// signature AlgorithmIdentifier,
|
||||
// issuer Name,
|
||||
// validity Validity,
|
||||
// subject Name,
|
||||
// subjectPublicKeyInfo SubjectPublicKeyInfo,
|
||||
// issuerUniqueID [1] IMPLICIT UniqueIdentifier OPTIONAL,
|
||||
// subjectUniqueID [2] IMPLICIT UniqueIdentifier OPTIONAL,
|
||||
// extensions [3] Extensions OPTIONAL
|
||||
var TBSCertificate = asn1.define('TBSCertificate', function() {
|
||||
this.seq().obj(
|
||||
this.key('version').def('v1').explicit(0).use(Version),
|
||||
this.key('serialNumber').int(),
|
||||
this.key('signature').use(AlgorithmIdentifier),
|
||||
this.key('issuer').use(Name),
|
||||
this.key('validity').use(Validity),
|
||||
this.key('subject').use(Name),
|
||||
this.key('subjectPublicKeyInfo').use(SubjectPublicKeyInfo),
|
||||
this.key('issuerUniqueID').optional().implicit(1).bitstr(),
|
||||
this.key('subjectUniqueID').optional().implicit(2).bitstr(),
|
||||
this.key('extensions').optional().explicit(3).seqof(Extension)
|
||||
);
|
||||
});
|
||||
rfc5280.TBSCertificate = TBSCertificate;
|
||||
|
||||
// Version ::= INTEGER { v1(0), v2(1), v3(2) }
|
||||
var Version = asn1.define('Version', function() {
|
||||
this.int({
|
||||
0: 'v1',
|
||||
1: 'v2',
|
||||
2: 'v3'
|
||||
});
|
||||
});
|
||||
rfc5280.Version = Version;
|
||||
|
||||
// Validity ::= SEQUENCE {
|
||||
// notBefore Time,
|
||||
// notAfter Time }
|
||||
var Validity = asn1.define('Validity', function() {
|
||||
this.seq().obj(
|
||||
this.key('notBefore').use(Time),
|
||||
this.key('notAfter').use(Time)
|
||||
);
|
||||
});
|
||||
rfc5280.Validity = Validity;
|
||||
|
||||
// Time ::= CHOICE {
|
||||
// utcTime UTCTime,
|
||||
// generalTime GeneralizedTime }
|
||||
var Time = asn1.define('Time', function() {
|
||||
this.choice({
|
||||
utcTime: this.utctime(),
|
||||
genTime: this.gentime()
|
||||
});
|
||||
});
|
||||
rfc5280.Time = Time;
|
||||
|
||||
// SubjectPublicKeyInfo ::= SEQUENCE {
|
||||
// algorithm AlgorithmIdentifier,
|
||||
// subjectPublicKey BIT STRING }
|
||||
var SubjectPublicKeyInfo = asn1.define('SubjectPublicKeyInfo', function() {
|
||||
this.seq().obj(
|
||||
this.key('algorithm').use(AlgorithmIdentifier),
|
||||
this.key('subjectPublicKey').bitstr()
|
||||
);
|
||||
});
|
||||
rfc5280.SubjectPublicKeyInfo = SubjectPublicKeyInfo;
|
||||
|
||||
// TBSCertList ::= SEQUENCE {
|
||||
// version Version OPTIONAL,
|
||||
// signature AlgorithmIdentifier,
|
||||
// issuer Name,
|
||||
// thisUpdate Time,
|
||||
// nextUpdate Time OPTIONAL,
|
||||
// revokedCertificates SEQUENCE OF SEQUENCE {
|
||||
// userCertificate CertificateSerialNumber,
|
||||
// revocationDate Time,
|
||||
// crlEntryExtensions Extensions OPTIONAL
|
||||
// } OPTIONAL,
|
||||
// crlExtensions [0] Extensions OPTIONAL }
|
||||
var TBSCertList = asn1.define('TBSCertList', function() {
|
||||
this.seq().obj(
|
||||
this.key('version').optional().int(),
|
||||
this.key('signature').use(AlgorithmIdentifier),
|
||||
this.key('issuer').use(Name),
|
||||
this.key('thisUpdate').use(Time),
|
||||
this.key('nextUpdate').use(Time),
|
||||
this.key('revokedCertificates').optional().seqof(RevokedCertificate),
|
||||
this.key('crlExtensions').explicit(0).optional().seqof(Extension)
|
||||
);
|
||||
});
|
||||
rfc5280.TBSCertList = TBSCertList;
|
||||
|
||||
var RevokedCertificate = asn1.define('RevokedCertificate', function() {
|
||||
this.seq().obj(
|
||||
this.key('userCertificate').use(CertificateSerialNumber),
|
||||
this.key('revocationDate').use(Time),
|
||||
this.key('crlEntryExtensions').optional().seqof(Extension)
|
||||
)
|
||||
});
|
||||
|
||||
// Extension ::= SEQUENCE {
|
||||
// extnID OBJECT IDENTIFIER,
|
||||
// critical BOOLEAN DEFAULT FALSE,
|
||||
// extnValue OCTET STRING }
|
||||
var Extension = asn1.define('Extension', function() {
|
||||
this.seq().obj(
|
||||
this.key('extnID').objid(x509OIDs),
|
||||
this.key('critical').bool().def(false),
|
||||
this.key('extnValue').octstr().contains(function(obj) {
|
||||
var out = x509Extensions[obj.extnID];
|
||||
// Cope with unknown extensions
|
||||
return out ? out : asn1.define('OctString', function() { this.any() })
|
||||
})
|
||||
);
|
||||
});
|
||||
rfc5280.Extension = Extension;
|
||||
|
||||
// Name ::= CHOICE { -- only one possibility for now --
|
||||
// rdnSequence RDNSequence }
|
||||
var Name = asn1.define('Name', function() {
|
||||
this.choice({
|
||||
rdnSequence: this.use(RDNSequence)
|
||||
});
|
||||
});
|
||||
rfc5280.Name = Name;
|
||||
|
||||
// GeneralName ::= CHOICE {
|
||||
// otherName [0] AnotherName,
|
||||
// rfc822Name [1] IA5String,
|
||||
// dNSName [2] IA5String,
|
||||
// x400Address [3] ORAddress,
|
||||
// directoryName [4] Name,
|
||||
// ediPartyName [5] EDIPartyName,
|
||||
// uniformResourceIdentifier [6] IA5String,
|
||||
// iPAddress [7] OCTET STRING,
|
||||
// registeredID [8] OBJECT IDENTIFIER }
|
||||
var GeneralName = asn1.define('GeneralName', function() {
|
||||
this.choice({
|
||||
otherName: this.implicit(0).use(AnotherName),
|
||||
rfc822Name: this.implicit(1).ia5str(),
|
||||
dNSName: this.implicit(2).ia5str(),
|
||||
directoryName: this.explicit(4).use(Name),
|
||||
ediPartyName: this.implicit(5).use(EDIPartyName),
|
||||
uniformResourceIdentifier: this.implicit(6).ia5str(),
|
||||
iPAddress: this.implicit(7).octstr(),
|
||||
registeredID: this.implicit(8).objid()
|
||||
});
|
||||
});
|
||||
rfc5280.GeneralName = GeneralName;
|
||||
|
||||
// GeneralNames ::= SEQUENCE SIZE (1..MAX) OF GeneralName
|
||||
var GeneralNames = asn1.define('GeneralNames', function() {
|
||||
this.seqof(GeneralName);
|
||||
});
|
||||
rfc5280.GeneralNames = GeneralNames;
|
||||
|
||||
// AnotherName ::= SEQUENCE {
|
||||
// type-id OBJECT IDENTIFIER,
|
||||
// value [0] EXPLICIT ANY DEFINED BY type-id }
|
||||
var AnotherName = asn1.define('AnotherName', function() {
|
||||
this.seq().obj(
|
||||
this.key('type-id').objid(),
|
||||
this.key('value').explicit(0).any()
|
||||
);
|
||||
});
|
||||
rfc5280.AnotherName = AnotherName;
|
||||
|
||||
// EDIPartyName ::= SEQUENCE {
|
||||
// nameAssigner [0] DirectoryString OPTIONAL,
|
||||
// partyName [1] DirectoryString }
|
||||
var EDIPartyName = asn1.define('EDIPartyName', function() {
|
||||
this.seq().obj(
|
||||
this.key('nameAssigner').implicit(0).optional().use(DirectoryString),
|
||||
this.key('partyName').implicit(1).use(DirectoryString)
|
||||
);
|
||||
});
|
||||
rfc5280.EDIPartyName = EDIPartyName;
|
||||
|
||||
// RDNSequence ::= SEQUENCE OF RelativeDistinguishedName
|
||||
var RDNSequence = asn1.define('RDNSequence', function() {
|
||||
this.seqof(RelativeDistinguishedName);
|
||||
});
|
||||
rfc5280.RDNSequence = RDNSequence;
|
||||
|
||||
// RelativeDistinguishedName ::=
|
||||
// SET SIZE (1..MAX) OF AttributeTypeAndValue
|
||||
var RelativeDistinguishedName = asn1.define('RelativeDistinguishedName',
|
||||
function() {
|
||||
this.setof(AttributeTypeAndValue);
|
||||
});
|
||||
rfc5280.RelativeDistinguishedName = RelativeDistinguishedName;
|
||||
|
||||
// AttributeTypeAndValue ::= SEQUENCE {
|
||||
// type AttributeType,
|
||||
// value AttributeValue }
|
||||
var AttributeTypeAndValue = asn1.define('AttributeTypeAndValue', function() {
|
||||
this.seq().obj(
|
||||
this.key('type').use(AttributeType),
|
||||
this.key('value').use(AttributeValue)
|
||||
);
|
||||
});
|
||||
rfc5280.AttributeTypeAndValue = AttributeTypeAndValue;
|
||||
|
||||
// Attribute ::= SEQUENCE {
|
||||
// type AttributeType,
|
||||
// values SET OF AttributeValue }
|
||||
var Attribute = asn1.define('Attribute', function() {
|
||||
this.seq().obj(
|
||||
this.key('type').use(AttributeType),
|
||||
this.key('values').setof(AttributeValue)
|
||||
);
|
||||
});
|
||||
rfc5280.Attribute = Attribute;
|
||||
|
||||
// AttributeType ::= OBJECT IDENTIFIER
|
||||
var AttributeType = asn1.define('AttributeType', function() {
|
||||
this.objid();
|
||||
});
|
||||
rfc5280.AttributeType = AttributeType;
|
||||
|
||||
// AttributeValue ::= ANY -- DEFINED BY AttributeType
|
||||
var AttributeValue = asn1.define('AttributeValue', function() {
|
||||
this.any();
|
||||
});
|
||||
rfc5280.AttributeValue = AttributeValue;
|
||||
|
||||
// DirectoryString ::= CHOICE {
|
||||
// teletexString TeletexString (SIZE (1..MAX)),
|
||||
// printableString PrintableString (SIZE (1..MAX)),
|
||||
// universalString UniversalString (SIZE (1..MAX)),
|
||||
// utf8String UTF8String (SIZE (1..MAX)),
|
||||
// bmpString BMPString (SIZE (1..MAX)) }
|
||||
var DirectoryString = asn1.define('DirectoryString', function() {
|
||||
this.choice({
|
||||
teletexString: this.t61str(),
|
||||
printableString: this.printstr(),
|
||||
universalString: this.unistr(),
|
||||
utf8String: this.utf8str(),
|
||||
bmpString: this.bmpstr()
|
||||
});
|
||||
});
|
||||
rfc5280.DirectoryString = DirectoryString;
|
||||
|
||||
// AuthorityKeyIdentifier ::= SEQUENCE {
|
||||
// keyIdentifier [0] KeyIdentifier OPTIONAL,
|
||||
// authorityCertIssuer [1] GeneralNames OPTIONAL,
|
||||
// authorityCertSerialNumber [2] CertificateSerialNumber OPTIONAL }
|
||||
var AuthorityKeyIdentifier = asn1.define('AuthorityKeyIdentifier', function() {
|
||||
this.seq().obj(
|
||||
this.key('keyIdentifier').implicit(0).optional().use(KeyIdentifier),
|
||||
this.key('authorityCertIssuer').implicit(1).optional().use(GeneralNames),
|
||||
this.key('authorityCertSerialNumber').implicit(2).optional()
|
||||
.use(CertificateSerialNumber)
|
||||
);
|
||||
});
|
||||
rfc5280.AuthorityKeyIdentifier = AuthorityKeyIdentifier;
|
||||
|
||||
// KeyIdentifier ::= OCTET STRING
|
||||
var KeyIdentifier = asn1.define('KeyIdentifier', function() {
|
||||
this.octstr();
|
||||
});
|
||||
rfc5280.KeyIdentifier = KeyIdentifier;
|
||||
|
||||
// CertificateSerialNumber ::= INTEGER
|
||||
var CertificateSerialNumber = asn1.define('CertificateSerialNumber',
|
||||
function() {
|
||||
this.int();
|
||||
});
|
||||
rfc5280.CertificateSerialNumber = CertificateSerialNumber;
|
||||
|
||||
// ORAddress ::= SEQUENCE {
|
||||
// built-in-standard-attributes BuiltInStandardAttributes,
|
||||
// built-in-domain-defined-attributes BuiltInDomainDefinedAttributes
|
||||
// OPTIONAL,
|
||||
// extension-attributes ExtensionAttributes OPTIONAL }
|
||||
var ORAddress = asn1.define('ORAddress', function() {
|
||||
this.seq().obj(
|
||||
this.key('builtInStandardAttributes').use(BuiltInStandardAttributes),
|
||||
this.key('builtInDomainDefinedAttributes').optional()
|
||||
.use(BuiltInDomainDefinedAttributes),
|
||||
this.key('extensionAttributes').optional().use(ExtensionAttributes)
|
||||
);
|
||||
});
|
||||
rfc5280.ORAddress = ORAddress;
|
||||
|
||||
// BuiltInStandardAttributes ::= SEQUENCE {
|
||||
// country-name CountryName OPTIONAL,
|
||||
// administration-domain-name AdministrationDomainName OPTIONAL,
|
||||
// network-address [0] IMPLICIT NetworkAddress OPTIONAL,
|
||||
// terminal-identifier [1] IMPLICIT TerminalIdentifier OPTIONAL,
|
||||
// private-domain-name [2] PrivateDomainName OPTIONAL,
|
||||
// organization-name [3] IMPLICIT OrganizationName OPTIONAL,
|
||||
// numeric-user-identifier [4] IMPLICIT NumericUserIdentifier OPTIONAL,
|
||||
// personal-name [5] IMPLICIT PersonalName OPTIONAL,
|
||||
// organizational-unit-names [6] IMPLICIT OrganizationalUnitNames OPTIONAL }
|
||||
var BuiltInStandardAttributes = asn1.define('BuiltInStandardAttributes',
|
||||
function() {
|
||||
this.seq().obj(
|
||||
this.key('countryName').optional().use(CountryName),
|
||||
this.key('administrationDomainName').optional()
|
||||
.use(AdministrationDomainName),
|
||||
this.key('networkAddress').implicit(0).optional().use(NetworkAddress),
|
||||
this.key('terminalIdentifier').implicit(1).optional()
|
||||
.use(TerminalIdentifier),
|
||||
this.key('privateDomainName').explicit(2).optional().use(PrivateDomainName),
|
||||
this.key('organizationName').implicit(3).optional().use(OrganizationName),
|
||||
this.key('numericUserIdentifier').implicit(4).optional()
|
||||
.use(NumericUserIdentifier),
|
||||
this.key('personalName').implicit(5).optional().use(PersonalName),
|
||||
this.key('organizationalUnitNames').implicit(6).optional()
|
||||
.use(OrganizationalUnitNames)
|
||||
);
|
||||
});
|
||||
rfc5280.BuiltInStandardAttributes = BuiltInStandardAttributes;
|
||||
|
||||
// CountryName ::= CHOICE {
|
||||
// x121-dcc-code NumericString,
|
||||
// iso-3166-alpha2-code PrintableString }
|
||||
var CountryName = asn1.define('CountryName', function() {
|
||||
this.choice({
|
||||
x121DccCode: this.numstr(),
|
||||
iso3166Alpha2Code: this.printstr()
|
||||
});
|
||||
});
|
||||
rfc5280.CountryName = CountryName;
|
||||
|
||||
|
||||
// AdministrationDomainName ::= CHOICE {
|
||||
// numeric NumericString,
|
||||
// printable PrintableString }
|
||||
var AdministrationDomainName = asn1.define('AdministrationDomainName',
|
||||
function() {
|
||||
this.choice({
|
||||
numeric: this.numstr(),
|
||||
printable: this.printstr()
|
||||
});
|
||||
});
|
||||
rfc5280.AdministrationDomainName = AdministrationDomainName;
|
||||
|
||||
// NetworkAddress ::= X121Address
|
||||
var NetworkAddress = asn1.define('NetworkAddress', function() {
|
||||
this.use(X121Address);
|
||||
});
|
||||
rfc5280.NetworkAddress = NetworkAddress;
|
||||
|
||||
// X121Address ::= NumericString
|
||||
var X121Address = asn1.define('X121Address', function() {
|
||||
this.numstr();
|
||||
});
|
||||
rfc5280.X121Address = X121Address;
|
||||
|
||||
// TerminalIdentifier ::= PrintableString
|
||||
var TerminalIdentifier = asn1.define('TerminalIdentifier', function() {
|
||||
this.printstr();
|
||||
});
|
||||
rfc5280.TerminalIdentifier = TerminalIdentifier;
|
||||
|
||||
// PrivateDomainName ::= CHOICE {
|
||||
// numeric NumericString,
|
||||
// printable PrintableString }
|
||||
var PrivateDomainName = asn1.define('PrivateDomainName', function() {
|
||||
this.choice({
|
||||
numeric: this.numstr(),
|
||||
printable: this.printstr()
|
||||
});
|
||||
});
|
||||
rfc5280.PrivateDomainName = PrivateDomainName;
|
||||
|
||||
// OrganizationName ::= PrintableString
|
||||
var OrganizationName = asn1.define('OrganizationName', function() {
|
||||
this.printstr();
|
||||
});
|
||||
rfc5280.OrganizationName = OrganizationName;
|
||||
|
||||
// NumericUserIdentifier ::= NumericString
|
||||
var NumericUserIdentifier = asn1.define('NumericUserIdentifier', function() {
|
||||
this.numstr();
|
||||
});
|
||||
rfc5280.NumericUserIdentifier = NumericUserIdentifier;
|
||||
|
||||
// PersonalName ::= SET {
|
||||
// surname [0] IMPLICIT PrintableString,
|
||||
// given-name [1] IMPLICIT PrintableString OPTIONAL,
|
||||
// initials [2] IMPLICIT PrintableString OPTIONAL,
|
||||
// generation-qualifier [3] IMPLICIT PrintableString OPTIONAL }
|
||||
var PersonalName = asn1.define('PersonalName', function() {
|
||||
this.set().obj(
|
||||
this.key('surname').implicit(0).printstr(),
|
||||
this.key('givenName').implicit(1).printstr(),
|
||||
this.key('initials').implicit(2).printstr(),
|
||||
this.key('generationQualifier').implicit(3).printstr()
|
||||
);
|
||||
});
|
||||
rfc5280.PersonalName = PersonalName;
|
||||
|
||||
// OrganizationalUnitNames ::= SEQUENCE SIZE (1..ub-organizational-units)
|
||||
// OF OrganizationalUnitName
|
||||
var OrganizationalUnitNames = asn1.define('OrganizationalUnitNames',
|
||||
function() {
|
||||
this.seqof(OrganizationalUnitName);
|
||||
});
|
||||
rfc5280.OrganizationalUnitNames = OrganizationalUnitNames;
|
||||
|
||||
// OrganizationalUnitName ::= PrintableString (SIZE
|
||||
// (1..ub-organizational-unit-name-length))
|
||||
var OrganizationalUnitName = asn1.define('OrganizationalUnitName', function() {
|
||||
this.printstr();
|
||||
});
|
||||
rfc5280.OrganizationalUnitName = OrganizationalUnitName;
|
||||
|
||||
// uiltInDomainDefinedAttributes ::= SEQUENCE SIZE
|
||||
// (1..ub-domain-defined-attributes)
|
||||
// OF BuiltInDomainDefinedAttribute
|
||||
var BuiltInDomainDefinedAttributes = asn1.define(
|
||||
'BuiltInDomainDefinedAttributes', function() {
|
||||
this.seqof(BuiltInDomainDefinedAttribute);
|
||||
});
|
||||
rfc5280.BuiltInDomainDefinedAttributes = BuiltInDomainDefinedAttributes;
|
||||
|
||||
// BuiltInDomainDefinedAttribute ::= SEQUENCE {
|
||||
// type PrintableString (SIZE (1..ub-domain-defined-attribute-type-length)),
|
||||
// value PrintableString (SIZE (1..ub-domain-defined-attribute-value-length))
|
||||
//}
|
||||
var BuiltInDomainDefinedAttribute = asn1.define('BuiltInDomainDefinedAttribute',
|
||||
function() {
|
||||
this.seq().obj(
|
||||
this.key('type').printstr(),
|
||||
this.key('value').printstr()
|
||||
);
|
||||
});
|
||||
rfc5280.BuiltInDomainDefinedAttribute = BuiltInDomainDefinedAttribute;
|
||||
|
||||
|
||||
// ExtensionAttributes ::= SET SIZE (1..ub-extension-attributes) OF
|
||||
// ExtensionAttribute
|
||||
var ExtensionAttributes = asn1.define('ExtensionAttributes', function() {
|
||||
this.seqof(ExtensionAttribute);
|
||||
});
|
||||
rfc5280.ExtensionAttributes = ExtensionAttributes;
|
||||
|
||||
// ExtensionAttribute ::= SEQUENCE {
|
||||
// extension-attribute-type [0] IMPLICIT INTEGER,
|
||||
// extension-attribute-value [1] ANY DEFINED BY extension-attribute-type }
|
||||
var ExtensionAttribute = asn1.define('ExtensionAttribute', function() {
|
||||
this.seq().obj(
|
||||
this.key('extensionAttributeType').implicit(0).int(),
|
||||
this.key('extensionAttributeValue').any().explicit(1).int()
|
||||
);
|
||||
});
|
||||
rfc5280.ExtensionAttribute = ExtensionAttribute;
|
||||
|
||||
// SubjectKeyIdentifier ::= KeyIdentifier
|
||||
var SubjectKeyIdentifier = asn1.define('SubjectKeyIdentifier', function() {
|
||||
this.use(KeyIdentifier);
|
||||
});
|
||||
rfc5280.SubjectKeyIdentifier = SubjectKeyIdentifier;
|
||||
|
||||
// KeyUsage ::= BIT STRING {
|
||||
// digitalSignature (0),
|
||||
// nonRepudiation (1), -- recent editions of X.509 have
|
||||
// -- renamed this bit to contentCommitment
|
||||
// keyEncipherment (2),
|
||||
// dataEncipherment (3),
|
||||
// keyAgreement (4),
|
||||
// keyCertSign (5),
|
||||
// cRLSign (6),
|
||||
// encipherOnly (7),
|
||||
// decipherOnly (8) }
|
||||
var KeyUsage = asn1.define('KeyUsage', function() {
|
||||
this.bitstr();
|
||||
});
|
||||
rfc5280.KeyUsage = KeyUsage;
|
||||
|
||||
// CertificatePolicies ::= SEQUENCE SIZE (1..MAX) OF PolicyInformation
|
||||
var CertificatePolicies = asn1.define('CertificatePolicies', function() {
|
||||
this.seqof(PolicyInformation);
|
||||
});
|
||||
rfc5280.CertificatePolicies = CertificatePolicies;
|
||||
|
||||
// PolicyInformation ::= SEQUENCE {
|
||||
// policyIdentifier CertPolicyId,
|
||||
// policyQualifiers SEQUENCE SIZE (1..MAX) OF PolicyQualifierInfo
|
||||
// OPTIONAL }
|
||||
var PolicyInformation = asn1.define('PolicyInformation', function() {
|
||||
this.seq().obj(
|
||||
this.key('policyIdentifier').use(CertPolicyId),
|
||||
this.key('policyQualifiers').optional().use(PolicyQualifiers)
|
||||
);
|
||||
});
|
||||
rfc5280.PolicyInformation = PolicyInformation;
|
||||
|
||||
// CertPolicyId ::= OBJECT IDENTIFIER
|
||||
var CertPolicyId = asn1.define('CertPolicyId', function() {
|
||||
this.objid();
|
||||
});
|
||||
rfc5280.CertPolicyId = CertPolicyId;
|
||||
|
||||
var PolicyQualifiers = asn1.define('PolicyQualifiers', function() {
|
||||
this.seqof(PolicyQualifierInfo);
|
||||
});
|
||||
rfc5280.PolicyQualifiers = PolicyQualifiers;
|
||||
|
||||
// PolicyQualifierInfo ::= SEQUENCE {
|
||||
// policyQualifierId PolicyQualifierId,
|
||||
// qualifier ANY DEFINED BY policyQualifierId }
|
||||
var PolicyQualifierInfo = asn1.define('PolicyQualifierInfo', function() {
|
||||
this.seq().obj(
|
||||
this.key('policyQualifierId').use(PolicyQualifierId),
|
||||
this.key('qualifier').any()
|
||||
);
|
||||
});
|
||||
rfc5280.PolicyQualifierInfo = PolicyQualifierInfo;
|
||||
|
||||
// PolicyQualifierId ::= OBJECT IDENTIFIER
|
||||
var PolicyQualifierId = asn1.define('PolicyQualifierId', function() {
|
||||
this.objid();
|
||||
});
|
||||
rfc5280.PolicyQualifierId = PolicyQualifierId;
|
||||
|
||||
// PolicyMappings ::= SEQUENCE SIZE (1..MAX) OF SEQUENCE {
|
||||
// issuerDomainPolicy CertPolicyId,
|
||||
// subjectDomainPolicy CertPolicyId }
|
||||
var PolicyMappings = asn1.define('PolicyMappings', function() {
|
||||
this.seqof(PolicyMapping);
|
||||
});
|
||||
rfc5280.PolicyMappings = PolicyMappings;
|
||||
|
||||
var PolicyMapping = asn1.define('PolicyMapping', function() {
|
||||
this.seq().obj(
|
||||
this.key('issuerDomainPolicy').use(CertPolicyId),
|
||||
this.key('subjectDomainPolicy').use(CertPolicyId)
|
||||
);
|
||||
});
|
||||
rfc5280.PolicyMapping = PolicyMapping;
|
||||
|
||||
// SubjectAltName ::= GeneralNames
|
||||
var SubjectAlternativeName = asn1.define('SubjectAlternativeName', function() {
|
||||
this.use(GeneralNames);
|
||||
});
|
||||
rfc5280.SubjectAlternativeName = SubjectAlternativeName;
|
||||
|
||||
// IssuerAltName ::= GeneralNames
|
||||
var IssuerAlternativeName = asn1.define('IssuerAlternativeName', function() {
|
||||
this.use(GeneralNames);
|
||||
});
|
||||
rfc5280.IssuerAlternativeName = IssuerAlternativeName;
|
||||
|
||||
// SubjectDirectoryAttributes ::= SEQUENCE SIZE (1..MAX) OF Attribute
|
||||
var SubjectDirectoryAttributes = asn1.define('SubjectDirectoryAttributes',
|
||||
function() {
|
||||
this.seqof(Attribute);
|
||||
});
|
||||
rfc5280.SubjectDirectoryAttributes = SubjectDirectoryAttributes;
|
||||
|
||||
// BasicConstraints ::= SEQUENCE {
|
||||
// cA BOOLEAN DEFAULT FALSE,
|
||||
// pathLenConstraint INTEGER (0..MAX) OPTIONAL }
|
||||
var BasicConstraints = asn1.define('BasicConstraints', function() {
|
||||
this.seq().obj(
|
||||
this.key('cA').bool().def(false),
|
||||
this.key('pathLenConstraint').optional().int()
|
||||
);
|
||||
});
|
||||
rfc5280.BasicConstraints = BasicConstraints;
|
||||
|
||||
// NameConstraints ::= SEQUENCE {
|
||||
// permittedSubtrees [0] GeneralSubtrees OPTIONAL,
|
||||
// excludedSubtrees [1] GeneralSubtrees OPTIONAL }
|
||||
var NameConstraints = asn1.define('NameConstraints', function() {
|
||||
this.seq().obj(
|
||||
this.key('permittedSubtrees').implicit(0).optional().use(GeneralSubtrees),
|
||||
this.key('excludedSubtrees').implicit(1).optional().use(GeneralSubtrees)
|
||||
);
|
||||
});
|
||||
rfc5280.NameConstraints = NameConstraints;
|
||||
|
||||
// GeneralSubtrees ::= SEQUENCE SIZE (1..MAX) OF GeneralSubtree
|
||||
var GeneralSubtrees = asn1.define('GeneralSubtrees', function() {
|
||||
this.seqof(GeneralSubtree);
|
||||
});
|
||||
rfc5280.GeneralSubtrees = GeneralSubtrees;
|
||||
|
||||
// GeneralSubtree ::= SEQUENCE {
|
||||
// base GeneralName,
|
||||
// minimum [0] BaseDistance DEFAULT 0,
|
||||
// maximum [1] BaseDistance OPTIONAL }
|
||||
var GeneralSubtree = asn1.define('GeneralSubtree', function() {
|
||||
this.seq().obj(
|
||||
this.key('base').use(GeneralName),
|
||||
this.key('minimum').implicit(0).def(0).use(BaseDistance),
|
||||
this.key('maximum').implicit(0).optional().use(BaseDistance)
|
||||
);
|
||||
});
|
||||
rfc5280.GeneralSubtree = GeneralSubtree;
|
||||
|
||||
// BaseDistance ::= INTEGER
|
||||
var BaseDistance = asn1.define('BaseDistance', function() {
|
||||
this.int();
|
||||
});
|
||||
rfc5280.BaseDistance = BaseDistance;
|
||||
|
||||
// PolicyConstraints ::= SEQUENCE {
|
||||
// requireExplicitPolicy [0] SkipCerts OPTIONAL,
|
||||
// inhibitPolicyMapping [1] SkipCerts OPTIONAL }
|
||||
var PolicyConstraints = asn1.define('PolicyConstraints', function() {
|
||||
this.seq().obj(
|
||||
this.key('requireExplicitPolicy').implicit(0).optional().use(SkipCerts),
|
||||
this.key('inhibitPolicyMapping').implicit(1).optional().use(SkipCerts)
|
||||
);
|
||||
});
|
||||
rfc5280.PolicyConstraints = PolicyConstraints;
|
||||
|
||||
// SkipCerts ::= INTEGER
|
||||
var SkipCerts = asn1.define('SkipCerts', function() {
|
||||
this.int();
|
||||
});
|
||||
rfc5280.SkipCerts = SkipCerts;
|
||||
|
||||
// ExtKeyUsageSyntax ::= SEQUENCE SIZE (1..MAX) OF KeyPurposeId
|
||||
var ExtendedKeyUsage = asn1.define('ExtendedKeyUsage', function() {
|
||||
this.seqof(KeyPurposeId);
|
||||
});
|
||||
rfc5280.ExtendedKeyUsage = ExtendedKeyUsage;
|
||||
|
||||
// KeyPurposeId ::= OBJECT IDENTIFIER
|
||||
var KeyPurposeId = asn1.define('KeyPurposeId', function() {
|
||||
this.objid();
|
||||
});
|
||||
rfc5280.KeyPurposeId = KeyPurposeId;
|
||||
|
||||
// RLDistributionPoints ::= SEQUENCE SIZE (1..MAX) OF DistributionPoint
|
||||
var CRLDistributionPoints = asn1.define('CRLDistributionPoints', function() {
|
||||
this.seqof(DistributionPoint);
|
||||
});
|
||||
rfc5280.CRLDistributionPoints = CRLDistributionPoints;
|
||||
|
||||
// DistributionPoint ::= SEQUENCE {
|
||||
// distributionPoint [0] DistributionPointName OPTIONAL,
|
||||
// reasons [1] ReasonFlags OPTIONAL,
|
||||
// cRLIssuer [2] GeneralNames OPTIONAL }
|
||||
var DistributionPoint = asn1.define('DistributionPoint', function() {
|
||||
this.seq().obj(
|
||||
this.key('distributionPoint').optional().explicit(0)
|
||||
.use(DistributionPointName),
|
||||
this.key('reasons').optional().implicit(1).use(ReasonFlags),
|
||||
this.key('cRLIssuer').optional().implicit(2).use(GeneralNames)
|
||||
);
|
||||
});
|
||||
rfc5280.DistributionPoint = DistributionPoint;
|
||||
|
||||
// DistributionPointName ::= CHOICE {
|
||||
// fullName [0] GeneralNames,
|
||||
// nameRelativeToCRLIssuer [1] RelativeDistinguishedName }
|
||||
var DistributionPointName = asn1.define('DistributionPointName', function() {
|
||||
this.choice({
|
||||
fullName: this.implicit(0).use(GeneralNames),
|
||||
nameRelativeToCRLIssuer: this.implicit(1).use(RelativeDistinguishedName)
|
||||
});
|
||||
});
|
||||
rfc5280.DistributionPointName = DistributionPointName;
|
||||
|
||||
// ReasonFlags ::= BIT STRING {
|
||||
// unused (0),
|
||||
// keyCompromise (1),
|
||||
// cACompromise (2),
|
||||
// affiliationChanged (3),
|
||||
// superseded (4),
|
||||
// cessationOfOperation (5),
|
||||
// certificateHold (6),
|
||||
// privilegeWithdrawn (7),
|
||||
// aACompromise (8) }
|
||||
var ReasonFlags = asn1.define('ReasonFlags', function() {
|
||||
this.bitstr();
|
||||
});
|
||||
rfc5280.ReasonFlags = ReasonFlags;
|
||||
|
||||
// InhibitAnyPolicy ::= SkipCerts
|
||||
var InhibitAnyPolicy = asn1.define('InhibitAnyPolicy', function() {
|
||||
this.use(SkipCerts);
|
||||
});
|
||||
rfc5280.InhibitAnyPolicy = InhibitAnyPolicy;
|
||||
|
||||
// FreshestCRL ::= CRLDistributionPoints
|
||||
var FreshestCRL = asn1.define('FreshestCRL', function() {
|
||||
this.use(CRLDistributionPoints);
|
||||
});
|
||||
rfc5280.FreshestCRL = FreshestCRL;
|
||||
|
||||
// AuthorityInfoAccessSyntax ::=
|
||||
// SEQUENCE SIZE (1..MAX) OF AccessDescription
|
||||
var AuthorityInfoAccessSyntax = asn1.define('AuthorityInfoAccessSyntax',
|
||||
function() {
|
||||
this.seqof(AccessDescription);
|
||||
});
|
||||
rfc5280.AuthorityInfoAccessSyntax = AuthorityInfoAccessSyntax;
|
||||
|
||||
// AccessDescription ::= SEQUENCE {
|
||||
// accessMethod OBJECT IDENTIFIER,
|
||||
// accessLocation GeneralName }
|
||||
var AccessDescription = asn1.define('AccessDescription', function() {
|
||||
this.seq().obj(
|
||||
this.key('accessMethod').objid(),
|
||||
this.key('accessLocation').use(GeneralName)
|
||||
);
|
||||
});
|
||||
rfc5280.AccessDescription = AccessDescription;
|
||||
|
||||
// SubjectInfoAccessSyntax ::=
|
||||
// SEQUENCE SIZE (1..MAX) OF AccessDescription
|
||||
var SubjectInformationAccess = asn1.define('SubjectInformationAccess',
|
||||
function() {
|
||||
this.seqof(AccessDescription);
|
||||
});
|
||||
rfc5280.SubjectInformationAccess = SubjectInformationAccess;
|
||||
|
||||
/**
|
||||
* CRL Extensions
|
||||
*/
|
||||
|
||||
// CRLNumber ::= INTEGER
|
||||
var CRLNumber = asn1.define('CRLNumber', function() {
|
||||
this.int();
|
||||
});
|
||||
rfc5280.CRLNumber = CRLNumber;
|
||||
|
||||
var DeltaCRLIndicator = asn1.define('DeltaCRLIndicator', function() {
|
||||
this.use(CRLNumber);
|
||||
});
|
||||
rfc5280.DeltaCRLIndicator = DeltaCRLIndicator;
|
||||
|
||||
// IssuingDistributionPoint ::= SEQUENCE {
|
||||
// distributionPoint [0] DistributionPointName OPTIONAL,
|
||||
// onlyContainsUserCerts [1] BOOLEAN DEFAULT FALSE,
|
||||
// onlyContainsCACerts [2] BOOLEAN DEFAULT FALSE,
|
||||
// onlySomeReasons [3] ReasonFlags OPTIONAL,
|
||||
// indirectCRL [4] BOOLEAN DEFAULT FALSE,
|
||||
// onlyContainsAttributeCerts [5] BOOLEAN DEFAULT FALSE }
|
||||
var IssuingDistributionPoint = asn1.define('IssuingDistributionPoint',
|
||||
function() {
|
||||
this.seq().obj(
|
||||
this.key('distributionPoint').explicit(0).optional()
|
||||
.use(DistributionPointName),
|
||||
this.key('onlyContainsUserCerts').implicit(1).def(false).bool(),
|
||||
this.key('onlyContainsCACerts').implicit(2).def(false).bool(),
|
||||
this.key('onlySomeReasons').implicit(3).optional().use(ReasonFlags),
|
||||
this.key('indirectCRL').implicit(4).def(false).bool(),
|
||||
this.key('onlyContainsAttributeCerts').implicit(5).def(false).bool()
|
||||
);
|
||||
});
|
||||
rfc5280.IssuingDistributionPoint = IssuingDistributionPoint;
|
||||
|
||||
// CRLReason ::= ENUMERATED {
|
||||
// unspecified (0),
|
||||
// keyCompromise (1),
|
||||
// cACompromise (2),
|
||||
// affiliationChanged (3),
|
||||
// superseded (4),
|
||||
// cessationOfOperation (5),
|
||||
// certificateHold (6),
|
||||
// -- value 7 is not used
|
||||
// removeFromCRL (8),
|
||||
// privilegeWithdrawn (9),
|
||||
// aACompromise (10) }
|
||||
var ReasonCode = asn1.define('ReasonCode', function() {
|
||||
this.enum({
|
||||
0: 'unspecified',
|
||||
1: 'keyCompromise',
|
||||
2: 'cACompromise',
|
||||
3: 'affiliationChanged',
|
||||
4: 'superseded',
|
||||
5: 'cessationOfOperation',
|
||||
6: 'certificateHold',
|
||||
8: 'removeFromCRL',
|
||||
9: 'privilegeWithdrawn',
|
||||
10: 'aACompromise'
|
||||
});
|
||||
});
|
||||
rfc5280.ReasonCode = ReasonCode;
|
||||
|
||||
// InvalidityDate ::= GeneralizedTime
|
||||
var InvalidityDate = asn1.define('InvalidityDate', function() {
|
||||
this.gentime();
|
||||
});
|
||||
rfc5280.InvalidityDate = InvalidityDate;
|
||||
|
||||
// CertificateIssuer ::= GeneralNames
|
||||
var CertificateIssuer = asn1.define('CertificateIssuer', function() {
|
||||
this.use(GeneralNames);
|
||||
});
|
||||
rfc5280.CertificateIssuer = CertificateIssuer;
|
||||
|
||||
// OID label to extension model mapping
|
||||
var x509Extensions = {
|
||||
subjectDirectoryAttributes: SubjectDirectoryAttributes,
|
||||
subjectKeyIdentifier: SubjectKeyIdentifier,
|
||||
keyUsage: KeyUsage,
|
||||
subjectAlternativeName: SubjectAlternativeName,
|
||||
issuerAlternativeName: IssuerAlternativeName,
|
||||
basicConstraints: BasicConstraints,
|
||||
cRLNumber: CRLNumber,
|
||||
reasonCode: ReasonCode,
|
||||
invalidityDate: InvalidityDate,
|
||||
deltaCRLIndicator: DeltaCRLIndicator,
|
||||
issuingDistributionPoint: IssuingDistributionPoint,
|
||||
certificateIssuer: CertificateIssuer,
|
||||
nameConstraints: NameConstraints,
|
||||
cRLDistributionPoints: CRLDistributionPoints,
|
||||
certificatePolicies: CertificatePolicies,
|
||||
policyMappings: PolicyMappings,
|
||||
authorityKeyIdentifier: AuthorityKeyIdentifier,
|
||||
policyConstraints: PolicyConstraints,
|
||||
extendedKeyUsage: ExtendedKeyUsage,
|
||||
freshestCRL: FreshestCRL,
|
||||
inhibitAnyPolicy: InhibitAnyPolicy,
|
||||
authorityInformationAccess: AuthorityInfoAccessSyntax,
|
||||
subjectInformationAccess: SubjectInformationAccess
|
||||
};
|
30
node_modules/asn1.js-rfc5280/package.json
generated
vendored
|
@ -1,30 +0,0 @@
|
|||
{
|
||||
"name": "asn1.js-rfc5280",
|
||||
"version": "2.0.1",
|
||||
"description": "RFC5280 extension structures for asn1.js",
|
||||
"main": "index.js",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git@github.com:indutny/asn1.js"
|
||||
},
|
||||
"keywords": [
|
||||
"asn1",
|
||||
"rfc5280",
|
||||
"der"
|
||||
],
|
||||
"scripts": {
|
||||
"test": "mocha --reporter=spec test/*-test.js"
|
||||
},
|
||||
"author": "Felix Hanley",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/indutny/asn1.js/issues"
|
||||
},
|
||||
"homepage": "https://github.com/indutny/asn1.js",
|
||||
"dependencies": {
|
||||
"asn1.js": "^4.5.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"mocha": "^4.0.1"
|
||||
}
|
||||
}
|
100
node_modules/asn1.js/README.md
generated
vendored
|
@ -1,100 +0,0 @@
|
|||
# ASN1.js
|
||||
|
||||
ASN.1 DER Encoder/Decoder and DSL.
|
||||
|
||||
## Example
|
||||
|
||||
Define model:
|
||||
|
||||
```javascript
|
||||
var asn = require('asn1.js');
|
||||
|
||||
var Human = asn.define('Human', function() {
|
||||
this.seq().obj(
|
||||
this.key('firstName').octstr(),
|
||||
this.key('lastName').octstr(),
|
||||
this.key('age').int(),
|
||||
this.key('gender').enum({ 0: 'male', 1: 'female' }),
|
||||
this.key('bio').seqof(Bio)
|
||||
);
|
||||
});
|
||||
|
||||
var Bio = asn.define('Bio', function() {
|
||||
this.seq().obj(
|
||||
this.key('time').gentime(),
|
||||
this.key('description').octstr()
|
||||
);
|
||||
});
|
||||
```
|
||||
|
||||
Encode data:
|
||||
|
||||
```javascript
|
||||
var output = Human.encode({
|
||||
firstName: 'Thomas',
|
||||
lastName: 'Anderson',
|
||||
age: 28,
|
||||
gender: 'male',
|
||||
bio: [
|
||||
{
|
||||
time: +new Date('31 March 1999'),
|
||||
description: 'freedom of mind'
|
||||
}
|
||||
]
|
||||
}, 'der');
|
||||
```
|
||||
|
||||
Decode data:
|
||||
|
||||
```javascript
|
||||
var human = Human.decode(output, 'der');
|
||||
console.log(human);
|
||||
/*
|
||||
{ firstName: <Buffer 54 68 6f 6d 61 73>,
|
||||
lastName: <Buffer 41 6e 64 65 72 73 6f 6e>,
|
||||
age: 28,
|
||||
gender: 'male',
|
||||
bio:
|
||||
[ { time: 922820400000,
|
||||
description: <Buffer 66 72 65 65 64 6f 6d 20 6f 66 20 6d 69 6e 64> } ] }
|
||||
*/
|
||||
```
|
||||
|
||||
### Partial decode
|
||||
|
||||
Its possible to parse data without stopping on first error. In order to do it,
|
||||
you should call:
|
||||
|
||||
```javascript
|
||||
var human = Human.decode(output, 'der', { partial: true });
|
||||
console.log(human);
|
||||
/*
|
||||
{ result: { ... },
|
||||
errors: [ ... ] }
|
||||
*/
|
||||
```
|
||||
|
||||
#### LICENSE
|
||||
|
||||
This software is licensed under the MIT License.
|
||||
|
||||
Copyright Fedor Indutny, 2013.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to permit
|
||||
persons to whom the Software is furnished to do so, subject to the
|
||||
following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included
|
||||
in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
||||
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
||||
USE OR OTHER DEALINGS IN THE SOFTWARE.
|
9
node_modules/asn1.js/lib/asn1.js
generated
vendored
|
@ -1,9 +0,0 @@
|
|||
var asn1 = exports;
|
||||
|
||||
asn1.bignum = require('bn.js');
|
||||
|
||||
asn1.define = require('./asn1/api').define;
|
||||
asn1.base = require('./asn1/base');
|
||||
asn1.constants = require('./asn1/constants');
|
||||
asn1.decoders = require('./asn1/decoders');
|
||||
asn1.encoders = require('./asn1/encoders');
|
61
node_modules/asn1.js/lib/asn1/api.js
generated
vendored
|
@ -1,61 +0,0 @@
|
|||
var asn1 = require('../asn1');
|
||||
var inherits = require('inherits');
|
||||
|
||||
var api = exports;
|
||||
|
||||
api.define = function define(name, body) {
|
||||
return new Entity(name, body);
|
||||
};
|
||||
|
||||
function Entity(name, body) {
|
||||
this.name = name;
|
||||
this.body = body;
|
||||
|
||||
this.decoders = {};
|
||||
this.encoders = {};
|
||||
};
|
||||
|
||||
Entity.prototype._createNamed = function createNamed(base) {
|
||||
var named;
|
||||
try {
|
||||
named = require('vm').runInThisContext(
|
||||
'(function ' + this.name + '(entity) {\n' +
|
||||
' this._initNamed(entity);\n' +
|
||||
'})'
|
||||
);
|
||||
} catch (e) {
|
||||
named = function (entity) {
|
||||
this._initNamed(entity);
|
||||
};
|
||||
}
|
||||
inherits(named, base);
|
||||
named.prototype._initNamed = function initnamed(entity) {
|
||||
base.call(this, entity);
|
||||
};
|
||||
|
||||
return new named(this);
|
||||
};
|
||||
|
||||
Entity.prototype._getDecoder = function _getDecoder(enc) {
|
||||
enc = enc || 'der';
|
||||
// Lazily create decoder
|
||||
if (!this.decoders.hasOwnProperty(enc))
|
||||
this.decoders[enc] = this._createNamed(asn1.decoders[enc]);
|
||||
return this.decoders[enc];
|
||||
};
|
||||
|
||||
Entity.prototype.decode = function decode(data, enc, options) {
|
||||
return this._getDecoder(enc).decode(data, options);
|
||||
};
|
||||
|
||||
Entity.prototype._getEncoder = function _getEncoder(enc) {
|
||||
enc = enc || 'der';
|
||||
// Lazily create encoder
|
||||
if (!this.encoders.hasOwnProperty(enc))
|
||||
this.encoders[enc] = this._createNamed(asn1.encoders[enc]);
|
||||
return this.encoders[enc];
|
||||
};
|
||||
|
||||
Entity.prototype.encode = function encode(data, enc, /* internal */ reporter) {
|
||||
return this._getEncoder(enc).encode(data, reporter);
|
||||
};
|
116
node_modules/asn1.js/lib/asn1/base/buffer.js
generated
vendored
|
@ -1,116 +0,0 @@
|
|||
var inherits = require('inherits');
|
||||
var Reporter = require('../base').Reporter;
|
||||
var Buffer = require('buffer').Buffer;
|
||||
|
||||
function DecoderBuffer(base, options) {
|
||||
Reporter.call(this, options);
|
||||
if (!Buffer.isBuffer(base)) {
|
||||
this.error('Input not Buffer');
|
||||
return;
|
||||
}
|
||||
|
||||
this.base = base;
|
||||
this.offset = 0;
|
||||
this.length = base.length;
|
||||
}
|
||||
inherits(DecoderBuffer, Reporter);
|
||||
exports.DecoderBuffer = DecoderBuffer;
|
||||
|
||||
DecoderBuffer.prototype.save = function save() {
|
||||
return { offset: this.offset, reporter: Reporter.prototype.save.call(this) };
|
||||
};
|
||||
|
||||
DecoderBuffer.prototype.restore = function restore(save) {
|
||||
// Return skipped data
|
||||
var res = new DecoderBuffer(this.base);
|
||||
res.offset = save.offset;
|
||||
res.length = this.offset;
|
||||
|
||||
this.offset = save.offset;
|
||||
Reporter.prototype.restore.call(this, save.reporter);
|
||||
|
||||
return res;
|
||||
};
|
||||
|
||||
DecoderBuffer.prototype.isEmpty = function isEmpty() {
|
||||
return this.offset === this.length;
|
||||
};
|
||||
|
||||
DecoderBuffer.prototype.readUInt8 = function readUInt8(fail) {
|
||||
if (this.offset + 1 <= this.length)
|
||||
return this.base.readUInt8(this.offset++, true);
|
||||
else
|
||||
return this.error(fail || 'DecoderBuffer overrun');
|
||||
}
|
||||
|
||||
DecoderBuffer.prototype.skip = function skip(bytes, fail) {
|
||||
if (!(this.offset + bytes <= this.length))
|
||||
return this.error(fail || 'DecoderBuffer overrun');
|
||||
|
||||
var res = new DecoderBuffer(this.base);
|
||||
|
||||
// Share reporter state
|
||||
res._reporterState = this._reporterState;
|
||||
|
||||
res.offset = this.offset;
|
||||
res.length = this.offset + bytes;
|
||||
this.offset += bytes;
|
||||
return res;
|
||||
}
|
||||
|
||||
DecoderBuffer.prototype.raw = function raw(save) {
|
||||
return this.base.slice(save ? save.offset : this.offset, this.length);
|
||||
}
|
||||
|
||||
function EncoderBuffer(value, reporter) {
|
||||
if (Array.isArray(value)) {
|
||||
this.length = 0;
|
||||
this.value = value.map(function(item) {
|
||||
if (!(item instanceof EncoderBuffer))
|
||||
item = new EncoderBuffer(item, reporter);
|
||||
this.length += item.length;
|
||||
return item;
|
||||
}, this);
|
||||
} else if (typeof value === 'number') {
|
||||
if (!(0 <= value && value <= 0xff))
|
||||
return reporter.error('non-byte EncoderBuffer value');
|
||||
this.value = value;
|
||||
this.length = 1;
|
||||
} else if (typeof value === 'string') {
|
||||
this.value = value;
|
||||
this.length = Buffer.byteLength(value);
|
||||
} else if (Buffer.isBuffer(value)) {
|
||||
this.value = value;
|
||||
this.length = value.length;
|
||||
} else {
|
||||
return reporter.error('Unsupported type: ' + typeof value);
|
||||
}
|
||||
}
|
||||
exports.EncoderBuffer = EncoderBuffer;
|
||||
|
||||
EncoderBuffer.prototype.join = function join(out, offset) {
|
||||
if (!out)
|
||||
out = new Buffer(this.length);
|
||||
if (!offset)
|
||||
offset = 0;
|
||||
|
||||
if (this.length === 0)
|
||||
return out;
|
||||
|
||||
if (Array.isArray(this.value)) {
|
||||
this.value.forEach(function(item) {
|
||||
item.join(out, offset);
|
||||
offset += item.length;
|
||||
});
|
||||
} else {
|
||||
if (typeof this.value === 'number')
|
||||
out[offset] = this.value;
|
||||
else if (typeof this.value === 'string')
|
||||
out.write(this.value, offset);
|
||||
else if (Buffer.isBuffer(this.value))
|
||||
this.value.copy(out, offset);
|
||||
offset += this.length;
|
||||
}
|
||||
|
||||
return out;
|
||||
};
|
6
node_modules/asn1.js/lib/asn1/base/index.js
generated
vendored
|
@ -1,6 +0,0 @@
|
|||
var base = exports;
|
||||
|
||||
base.Reporter = require('./reporter').Reporter;
|
||||
base.DecoderBuffer = require('./buffer').DecoderBuffer;
|
||||
base.EncoderBuffer = require('./buffer').EncoderBuffer;
|
||||
base.Node = require('./node');
|
634
node_modules/asn1.js/lib/asn1/base/node.js
generated
vendored
|
@ -1,634 +0,0 @@
|
|||
var Reporter = require('../base').Reporter;
|
||||
var EncoderBuffer = require('../base').EncoderBuffer;
|
||||
var DecoderBuffer = require('../base').DecoderBuffer;
|
||||
var assert = require('minimalistic-assert');
|
||||
|
||||
// Supported tags
|
||||
var tags = [
|
||||
'seq', 'seqof', 'set', 'setof', 'objid', 'bool',
|
||||
'gentime', 'utctime', 'null_', 'enum', 'int', 'objDesc',
|
||||
'bitstr', 'bmpstr', 'charstr', 'genstr', 'graphstr', 'ia5str', 'iso646str',
|
||||
'numstr', 'octstr', 'printstr', 't61str', 'unistr', 'utf8str', 'videostr'
|
||||
];
|
||||
|
||||
// Public methods list
|
||||
var methods = [
|
||||
'key', 'obj', 'use', 'optional', 'explicit', 'implicit', 'def', 'choice',
|
||||
'any', 'contains'
|
||||
].concat(tags);
|
||||
|
||||
// Overrided methods list
|
||||
var overrided = [
|
||||
'_peekTag', '_decodeTag', '_use',
|
||||
'_decodeStr', '_decodeObjid', '_decodeTime',
|
||||
'_decodeNull', '_decodeInt', '_decodeBool', '_decodeList',
|
||||
|
||||
'_encodeComposite', '_encodeStr', '_encodeObjid', '_encodeTime',
|
||||
'_encodeNull', '_encodeInt', '_encodeBool'
|
||||
];
|
||||
|
||||
function Node(enc, parent) {
|
||||
var state = {};
|
||||
this._baseState = state;
|
||||
|
||||
state.enc = enc;
|
||||
|
||||
state.parent = parent || null;
|
||||
state.children = null;
|
||||
|
||||
// State
|
||||
state.tag = null;
|
||||
state.args = null;
|
||||
state.reverseArgs = null;
|
||||
state.choice = null;
|
||||
state.optional = false;
|
||||
state.any = false;
|
||||
state.obj = false;
|
||||
state.use = null;
|
||||
state.useDecoder = null;
|
||||
state.key = null;
|
||||
state['default'] = null;
|
||||
state.explicit = null;
|
||||
state.implicit = null;
|
||||
state.contains = null;
|
||||
|
||||
// Should create new instance on each method
|
||||
if (!state.parent) {
|
||||
state.children = [];
|
||||
this._wrap();
|
||||
}
|
||||
}
|
||||
module.exports = Node;
|
||||
|
||||
var stateProps = [
|
||||
'enc', 'parent', 'children', 'tag', 'args', 'reverseArgs', 'choice',
|
||||
'optional', 'any', 'obj', 'use', 'alteredUse', 'key', 'default', 'explicit',
|
||||
'implicit', 'contains'
|
||||
];
|
||||
|
||||
Node.prototype.clone = function clone() {
|
||||
var state = this._baseState;
|
||||
var cstate = {};
|
||||
stateProps.forEach(function(prop) {
|
||||
cstate[prop] = state[prop];
|
||||
});
|
||||
var res = new this.constructor(cstate.parent);
|
||||
res._baseState = cstate;
|
||||
return res;
|
||||
};
|
||||
|
||||
Node.prototype._wrap = function wrap() {
|
||||
var state = this._baseState;
|
||||
methods.forEach(function(method) {
|
||||
this[method] = function _wrappedMethod() {
|
||||
var clone = new this.constructor(this);
|
||||
state.children.push(clone);
|
||||
return clone[method].apply(clone, arguments);
|
||||
};
|
||||
}, this);
|
||||
};
|
||||
|
||||
Node.prototype._init = function init(body) {
|
||||
var state = this._baseState;
|
||||
|
||||
assert(state.parent === null);
|
||||
body.call(this);
|
||||
|
||||
// Filter children
|
||||
state.children = state.children.filter(function(child) {
|
||||
return child._baseState.parent === this;
|
||||
}, this);
|
||||
assert.equal(state.children.length, 1, 'Root node can have only one child');
|
||||
};
|
||||
|
||||
Node.prototype._useArgs = function useArgs(args) {
|
||||
var state = this._baseState;
|
||||
|
||||
// Filter children and args
|
||||
var children = args.filter(function(arg) {
|
||||
return arg instanceof this.constructor;
|
||||
}, this);
|
||||
args = args.filter(function(arg) {
|
||||
return !(arg instanceof this.constructor);
|
||||
}, this);
|
||||
|
||||
if (children.length !== 0) {
|
||||
assert(state.children === null);
|
||||
state.children = children;
|
||||
|
||||
// Replace parent to maintain backward link
|
||||
children.forEach(function(child) {
|
||||
child._baseState.parent = this;
|
||||
}, this);
|
||||
}
|
||||
if (args.length !== 0) {
|
||||
assert(state.args === null);
|
||||
state.args = args;
|
||||
state.reverseArgs = args.map(function(arg) {
|
||||
if (typeof arg !== 'object' || arg.constructor !== Object)
|
||||
return arg;
|
||||
|
||||
var res = {};
|
||||
Object.keys(arg).forEach(function(key) {
|
||||
if (key == (key | 0))
|
||||
key |= 0;
|
||||
var value = arg[key];
|
||||
res[value] = key;
|
||||
});
|
||||
return res;
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Overrided methods
|
||||
//
|
||||
|
||||
overrided.forEach(function(method) {
|
||||
Node.prototype[method] = function _overrided() {
|
||||
var state = this._baseState;
|
||||
throw new Error(method + ' not implemented for encoding: ' + state.enc);
|
||||
};
|
||||
});
|
||||
|
||||
//
|
||||
// Public methods
|
||||
//
|
||||
|
||||
tags.forEach(function(tag) {
|
||||
Node.prototype[tag] = function _tagMethod() {
|
||||
var state = this._baseState;
|
||||
var args = Array.prototype.slice.call(arguments);
|
||||
|
||||
assert(state.tag === null);
|
||||
state.tag = tag;
|
||||
|
||||
this._useArgs(args);
|
||||
|
||||
return this;
|
||||
};
|
||||
});
|
||||
|
||||
Node.prototype.use = function use(item) {
|
||||
assert(item);
|
||||
var state = this._baseState;
|
||||
|
||||
assert(state.use === null);
|
||||
state.use = item;
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
Node.prototype.optional = function optional() {
|
||||
var state = this._baseState;
|
||||
|
||||
state.optional = true;
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
Node.prototype.def = function def(val) {
|
||||
var state = this._baseState;
|
||||
|
||||
assert(state['default'] === null);
|
||||
state['default'] = val;
|
||||
state.optional = true;
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
Node.prototype.explicit = function explicit(num) {
|
||||
var state = this._baseState;
|
||||
|
||||
assert(state.explicit === null && state.implicit === null);
|
||||
state.explicit = num;
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
Node.prototype.implicit = function implicit(num) {
|
||||
var state = this._baseState;
|
||||
|
||||
assert(state.explicit === null && state.implicit === null);
|
||||
state.implicit = num;
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
Node.prototype.obj = function obj() {
|
||||
var state = this._baseState;
|
||||
var args = Array.prototype.slice.call(arguments);
|
||||
|
||||
state.obj = true;
|
||||
|
||||
if (args.length !== 0)
|
||||
this._useArgs(args);
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
Node.prototype.key = function key(newKey) {
|
||||
var state = this._baseState;
|
||||
|
||||
assert(state.key === null);
|
||||
state.key = newKey;
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
Node.prototype.any = function any() {
|
||||
var state = this._baseState;
|
||||
|
||||
state.any = true;
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
Node.prototype.choice = function choice(obj) {
|
||||
var state = this._baseState;
|
||||
|
||||
assert(state.choice === null);
|
||||
state.choice = obj;
|
||||
this._useArgs(Object.keys(obj).map(function(key) {
|
||||
return obj[key];
|
||||
}));
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
Node.prototype.contains = function contains(item) {
|
||||
var state = this._baseState;
|
||||
|
||||
assert(state.use === null);
|
||||
state.contains = item;
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
//
|
||||
// Decoding
|
||||
//
|
||||
|
||||
Node.prototype._decode = function decode(input, options) {
|
||||
var state = this._baseState;
|
||||
|
||||
// Decode root node
|
||||
if (state.parent === null)
|
||||
return input.wrapResult(state.children[0]._decode(input, options));
|
||||
|
||||
var result = state['default'];
|
||||
var present = true;
|
||||
|
||||
var prevKey = null;
|
||||
if (state.key !== null)
|
||||
prevKey = input.enterKey(state.key);
|
||||
|
||||
// Check if tag is there
|
||||
if (state.optional) {
|
||||
var tag = null;
|
||||
if (state.explicit !== null)
|
||||
tag = state.explicit;
|
||||
else if (state.implicit !== null)
|
||||
tag = state.implicit;
|
||||
else if (state.tag !== null)
|
||||
tag = state.tag;
|
||||
|
||||
if (tag === null && !state.any) {
|
||||
// Trial and Error
|
||||
var save = input.save();
|
||||
try {
|
||||
if (state.choice === null)
|
||||
this._decodeGeneric(state.tag, input, options);
|
||||
else
|
||||
this._decodeChoice(input, options);
|
||||
present = true;
|
||||
} catch (e) {
|
||||
present = false;
|
||||
}
|
||||
input.restore(save);
|
||||
} else {
|
||||
present = this._peekTag(input, tag, state.any);
|
||||
|
||||
if (input.isError(present))
|
||||
return present;
|
||||
}
|
||||
}
|
||||
|
||||
// Push object on stack
|
||||
var prevObj;
|
||||
if (state.obj && present)
|
||||
prevObj = input.enterObject();
|
||||
|
||||
if (present) {
|
||||
// Unwrap explicit values
|
||||
if (state.explicit !== null) {
|
||||
var explicit = this._decodeTag(input, state.explicit);
|
||||
if (input.isError(explicit))
|
||||
return explicit;
|
||||
input = explicit;
|
||||
}
|
||||
|
||||
var start = input.offset;
|
||||
|
||||
// Unwrap implicit and normal values
|
||||
if (state.use === null && state.choice === null) {
|
||||
if (state.any)
|
||||
var save = input.save();
|
||||
var body = this._decodeTag(
|
||||
input,
|
||||
state.implicit !== null ? state.implicit : state.tag,
|
||||
state.any
|
||||
);
|
||||
if (input.isError(body))
|
||||
return body;
|
||||
|
||||
if (state.any)
|
||||
result = input.raw(save);
|
||||
else
|
||||
input = body;
|
||||
}
|
||||
|
||||
if (options && options.track && state.tag !== null)
|
||||
options.track(input.path(), start, input.length, 'tagged');
|
||||
|
||||
if (options && options.track && state.tag !== null)
|
||||
options.track(input.path(), input.offset, input.length, 'content');
|
||||
|
||||
// Select proper method for tag
|
||||
if (state.any)
|
||||
result = result;
|
||||
else if (state.choice === null)
|
||||
result = this._decodeGeneric(state.tag, input, options);
|
||||
else
|
||||
result = this._decodeChoice(input, options);
|
||||
|
||||
if (input.isError(result))
|
||||
return result;
|
||||
|
||||
// Decode children
|
||||
if (!state.any && state.choice === null && state.children !== null) {
|
||||
state.children.forEach(function decodeChildren(child) {
|
||||
// NOTE: We are ignoring errors here, to let parser continue with other
|
||||
// parts of encoded data
|
||||
child._decode(input, options);
|
||||
});
|
||||
}
|
||||
|
||||
// Decode contained/encoded by schema, only in bit or octet strings
|
||||
if (state.contains && (state.tag === 'octstr' || state.tag === 'bitstr')) {
|
||||
var data = new DecoderBuffer(result);
|
||||
result = this._getUse(state.contains, input._reporterState.obj)
|
||||
._decode(data, options);
|
||||
}
|
||||
}
|
||||
|
||||
// Pop object
|
||||
if (state.obj && present)
|
||||
result = input.leaveObject(prevObj);
|
||||
|
||||
// Set key
|
||||
if (state.key !== null && (result !== null || present === true))
|
||||
input.leaveKey(prevKey, state.key, result);
|
||||
else if (prevKey !== null)
|
||||
input.exitKey(prevKey);
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
Node.prototype._decodeGeneric = function decodeGeneric(tag, input, options) {
|
||||
var state = this._baseState;
|
||||
|
||||
if (tag === 'seq' || tag === 'set')
|
||||
return null;
|
||||
if (tag === 'seqof' || tag === 'setof')
|
||||
return this._decodeList(input, tag, state.args[0], options);
|
||||
else if (/str$/.test(tag))
|
||||
return this._decodeStr(input, tag, options);
|
||||
else if (tag === 'objid' && state.args)
|
||||
return this._decodeObjid(input, state.args[0], state.args[1], options);
|
||||
else if (tag === 'objid')
|
||||
return this._decodeObjid(input, null, null, options);
|
||||
else if (tag === 'gentime' || tag === 'utctime')
|
||||
return this._decodeTime(input, tag, options);
|
||||
else if (tag === 'null_')
|
||||
return this._decodeNull(input, options);
|
||||
else if (tag === 'bool')
|
||||
return this._decodeBool(input, options);
|
||||
else if (tag === 'objDesc')
|
||||
return this._decodeStr(input, tag, options);
|
||||
else if (tag === 'int' || tag === 'enum')
|
||||
return this._decodeInt(input, state.args && state.args[0], options);
|
||||
|
||||
if (state.use !== null) {
|
||||
return this._getUse(state.use, input._reporterState.obj)
|
||||
._decode(input, options);
|
||||
} else {
|
||||
return input.error('unknown tag: ' + tag);
|
||||
}
|
||||
};
|
||||
|
||||
Node.prototype._getUse = function _getUse(entity, obj) {
|
||||
|
||||
var state = this._baseState;
|
||||
// Create altered use decoder if implicit is set
|
||||
state.useDecoder = this._use(entity, obj);
|
||||
assert(state.useDecoder._baseState.parent === null);
|
||||
state.useDecoder = state.useDecoder._baseState.children[0];
|
||||
if (state.implicit !== state.useDecoder._baseState.implicit) {
|
||||
state.useDecoder = state.useDecoder.clone();
|
||||
state.useDecoder._baseState.implicit = state.implicit;
|
||||
}
|
||||
return state.useDecoder;
|
||||
};
|
||||
|
||||
Node.prototype._decodeChoice = function decodeChoice(input, options) {
|
||||
var state = this._baseState;
|
||||
var result = null;
|
||||
var match = false;
|
||||
|
||||
Object.keys(state.choice).some(function(key) {
|
||||
var save = input.save();
|
||||
var node = state.choice[key];
|
||||
try {
|
||||
var value = node._decode(input, options);
|
||||
if (input.isError(value))
|
||||
return false;
|
||||
|
||||
result = { type: key, value: value };
|
||||
match = true;
|
||||
} catch (e) {
|
||||
input.restore(save);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}, this);
|
||||
|
||||
if (!match)
|
||||
return input.error('Choice not matched');
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
//
|
||||
// Encoding
|
||||
//
|
||||
|
||||
Node.prototype._createEncoderBuffer = function createEncoderBuffer(data) {
|
||||
return new EncoderBuffer(data, this.reporter);
|
||||
};
|
||||
|
||||
Node.prototype._encode = function encode(data, reporter, parent) {
|
||||
var state = this._baseState;
|
||||
if (state['default'] !== null && state['default'] === data)
|
||||
return;
|
||||
|
||||
var result = this._encodeValue(data, reporter, parent);
|
||||
if (result === undefined)
|
||||
return;
|
||||
|
||||
if (this._skipDefault(result, reporter, parent))
|
||||
return;
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
Node.prototype._encodeValue = function encode(data, reporter, parent) {
|
||||
var state = this._baseState;
|
||||
|
||||
// Decode root node
|
||||
if (state.parent === null)
|
||||
return state.children[0]._encode(data, reporter || new Reporter());
|
||||
|
||||
var result = null;
|
||||
|
||||
// Set reporter to share it with a child class
|
||||
this.reporter = reporter;
|
||||
|
||||
// Check if data is there
|
||||
if (state.optional && data === undefined) {
|
||||
if (state['default'] !== null)
|
||||
data = state['default']
|
||||
else
|
||||
return;
|
||||
}
|
||||
|
||||
// Encode children first
|
||||
var content = null;
|
||||
var primitive = false;
|
||||
if (state.any) {
|
||||
// Anything that was given is translated to buffer
|
||||
result = this._createEncoderBuffer(data);
|
||||
} else if (state.choice) {
|
||||
result = this._encodeChoice(data, reporter);
|
||||
} else if (state.contains) {
|
||||
content = this._getUse(state.contains, parent)._encode(data, reporter);
|
||||
primitive = true;
|
||||
} else if (state.children) {
|
||||
content = state.children.map(function(child) {
|
||||
if (child._baseState.tag === 'null_')
|
||||
return child._encode(null, reporter, data);
|
||||
|
||||
if (child._baseState.key === null)
|
||||
return reporter.error('Child should have a key');
|
||||
var prevKey = reporter.enterKey(child._baseState.key);
|
||||
|
||||
if (typeof data !== 'object')
|
||||
return reporter.error('Child expected, but input is not object');
|
||||
|
||||
var res = child._encode(data[child._baseState.key], reporter, data);
|
||||
reporter.leaveKey(prevKey);
|
||||
|
||||
return res;
|
||||
}, this).filter(function(child) {
|
||||
return child;
|
||||
});
|
||||
content = this._createEncoderBuffer(content);
|
||||
} else {
|
||||
if (state.tag === 'seqof' || state.tag === 'setof') {
|
||||
// TODO(indutny): this should be thrown on DSL level
|
||||
if (!(state.args && state.args.length === 1))
|
||||
return reporter.error('Too many args for : ' + state.tag);
|
||||
|
||||
if (!Array.isArray(data))
|
||||
return reporter.error('seqof/setof, but data is not Array');
|
||||
|
||||
var child = this.clone();
|
||||
child._baseState.implicit = null;
|
||||
content = this._createEncoderBuffer(data.map(function(item) {
|
||||
var state = this._baseState;
|
||||
|
||||
return this._getUse(state.args[0], data)._encode(item, reporter);
|
||||
}, child));
|
||||
} else if (state.use !== null) {
|
||||
result = this._getUse(state.use, parent)._encode(data, reporter);
|
||||
} else {
|
||||
content = this._encodePrimitive(state.tag, data);
|
||||
primitive = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Encode data itself
|
||||
var result;
|
||||
if (!state.any && state.choice === null) {
|
||||
var tag = state.implicit !== null ? state.implicit : state.tag;
|
||||
var cls = state.implicit === null ? 'universal' : 'context';
|
||||
|
||||
if (tag === null) {
|
||||
if (state.use === null)
|
||||
reporter.error('Tag could be omitted only for .use()');
|
||||
} else {
|
||||
if (state.use === null)
|
||||
result = this._encodeComposite(tag, primitive, cls, content);
|
||||
}
|
||||
}
|
||||
|
||||
// Wrap in explicit
|
||||
if (state.explicit !== null)
|
||||
result = this._encodeComposite(state.explicit, false, 'context', result);
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
Node.prototype._encodeChoice = function encodeChoice(data, reporter) {
|
||||
var state = this._baseState;
|
||||
|
||||
var node = state.choice[data.type];
|
||||
if (!node) {
|
||||
assert(
|
||||
false,
|
||||
data.type + ' not found in ' +
|
||||
JSON.stringify(Object.keys(state.choice)));
|
||||
}
|
||||
return node._encode(data.value, reporter);
|
||||
};
|
||||
|
||||
Node.prototype._encodePrimitive = function encodePrimitive(tag, data) {
|
||||
var state = this._baseState;
|
||||
|
||||
if (/str$/.test(tag))
|
||||
return this._encodeStr(data, tag);
|
||||
else if (tag === 'objid' && state.args)
|
||||
return this._encodeObjid(data, state.reverseArgs[0], state.args[1]);
|
||||
else if (tag === 'objid')
|
||||
return this._encodeObjid(data, null, null);
|
||||
else if (tag === 'gentime' || tag === 'utctime')
|
||||
return this._encodeTime(data, tag);
|
||||
else if (tag === 'null_')
|
||||
return this._encodeNull();
|
||||
else if (tag === 'int' || tag === 'enum')
|
||||
return this._encodeInt(data, state.args && state.reverseArgs[0]);
|
||||
else if (tag === 'bool')
|
||||
return this._encodeBool(data);
|
||||
else if (tag === 'objDesc')
|
||||
return this._encodeStr(data, tag);
|
||||
else
|
||||
throw new Error('Unsupported tag: ' + tag);
|
||||
};
|
||||
|
||||
Node.prototype._isNumstr = function isNumstr(str) {
|
||||
return /^[0-9 ]*$/.test(str);
|
||||
};
|
||||
|
||||
Node.prototype._isPrintstr = function isPrintstr(str) {
|
||||
return /^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(str);
|
||||
};
|
121
node_modules/asn1.js/lib/asn1/base/reporter.js
generated
vendored
|
@ -1,121 +0,0 @@
|
|||
var inherits = require('inherits');
|
||||
|
||||
function Reporter(options) {
|
||||
this._reporterState = {
|
||||
obj: null,
|
||||
path: [],
|
||||
options: options || {},
|
||||
errors: []
|
||||
};
|
||||
}
|
||||
exports.Reporter = Reporter;
|
||||
|
||||
Reporter.prototype.isError = function isError(obj) {
|
||||
return obj instanceof ReporterError;
|
||||
};
|
||||
|
||||
Reporter.prototype.save = function save() {
|
||||
var state = this._reporterState;
|
||||
|
||||
return { obj: state.obj, pathLen: state.path.length };
|
||||
};
|
||||
|
||||
Reporter.prototype.restore = function restore(data) {
|
||||
var state = this._reporterState;
|
||||
|
||||
state.obj = data.obj;
|
||||
state.path = state.path.slice(0, data.pathLen);
|
||||
};
|
||||
|
||||
Reporter.prototype.enterKey = function enterKey(key) {
|
||||
return this._reporterState.path.push(key);
|
||||
};
|
||||
|
||||
Reporter.prototype.exitKey = function exitKey(index) {
|
||||
var state = this._reporterState;
|
||||
|
||||
state.path = state.path.slice(0, index - 1);
|
||||
};
|
||||
|
||||
Reporter.prototype.leaveKey = function leaveKey(index, key, value) {
|
||||
var state = this._reporterState;
|
||||
|
||||
this.exitKey(index);
|
||||
if (state.obj !== null)
|
||||
state.obj[key] = value;
|
||||
};
|
||||
|
||||
Reporter.prototype.path = function path() {
|
||||
return this._reporterState.path.join('/');
|
||||
};
|
||||
|
||||
Reporter.prototype.enterObject = function enterObject() {
|
||||
var state = this._reporterState;
|
||||
|
||||
var prev = state.obj;
|
||||
state.obj = {};
|
||||
return prev;
|
||||
};
|
||||
|
||||
Reporter.prototype.leaveObject = function leaveObject(prev) {
|
||||
var state = this._reporterState;
|
||||
|
||||
var now = state.obj;
|
||||
state.obj = prev;
|
||||
return now;
|
||||
};
|
||||
|
||||
Reporter.prototype.error = function error(msg) {
|
||||
var err;
|
||||
var state = this._reporterState;
|
||||
|
||||
var inherited = msg instanceof ReporterError;
|
||||
if (inherited) {
|
||||
err = msg;
|
||||
} else {
|
||||
err = new ReporterError(state.path.map(function(elem) {
|
||||
return '[' + JSON.stringify(elem) + ']';
|
||||
}).join(''), msg.message || msg, msg.stack);
|
||||
}
|
||||
|
||||
if (!state.options.partial)
|
||||
throw err;
|
||||
|
||||
if (!inherited)
|
||||
state.errors.push(err);
|
||||
|
||||
return err;
|
||||
};
|
||||
|
||||
Reporter.prototype.wrapResult = function wrapResult(result) {
|
||||
var state = this._reporterState;
|
||||
if (!state.options.partial)
|
||||
return result;
|
||||
|
||||
return {
|
||||
result: this.isError(result) ? null : result,
|
||||
errors: state.errors
|
||||
};
|
||||
};
|
||||
|
||||
function ReporterError(path, msg) {
|
||||
this.path = path;
|
||||
this.rethrow(msg);
|
||||
};
|
||||
inherits(ReporterError, Error);
|
||||
|
||||
ReporterError.prototype.rethrow = function rethrow(msg) {
|
||||
this.message = msg + ' at: ' + (this.path || '(shallow)');
|
||||
if (Error.captureStackTrace)
|
||||
Error.captureStackTrace(this, ReporterError);
|
||||
|
||||
if (!this.stack) {
|
||||
try {
|
||||
// IE only adds stack when thrown
|
||||
throw new Error(this.message);
|
||||
} catch (e) {
|
||||
this.stack = e.stack;
|
||||
}
|
||||
}
|
||||
return this;
|
||||
};
|
42
node_modules/asn1.js/lib/asn1/constants/der.js
generated
vendored
|
@ -1,42 +0,0 @@
|
|||
var constants = require('../constants');
|
||||
|
||||
exports.tagClass = {
|
||||
0: 'universal',
|
||||
1: 'application',
|
||||
2: 'context',
|
||||
3: 'private'
|
||||
};
|
||||
exports.tagClassByName = constants._reverse(exports.tagClass);
|
||||
|
||||
exports.tag = {
|
||||
0x00: 'end',
|
||||
0x01: 'bool',
|
||||
0x02: 'int',
|
||||
0x03: 'bitstr',
|
||||
0x04: 'octstr',
|
||||
0x05: 'null_',
|
||||
0x06: 'objid',
|
||||
0x07: 'objDesc',
|
||||
0x08: 'external',
|
||||
0x09: 'real',
|
||||
0x0a: 'enum',
|
||||
0x0b: 'embed',
|
||||
0x0c: 'utf8str',
|
||||
0x0d: 'relativeOid',
|
||||
0x10: 'seq',
|
||||
0x11: 'set',
|
||||
0x12: 'numstr',
|
||||
0x13: 'printstr',
|
||||
0x14: 't61str',
|
||||
0x15: 'videostr',
|
||||
0x16: 'ia5str',
|
||||
0x17: 'utctime',
|
||||
0x18: 'gentime',
|
||||
0x19: 'graphstr',
|
||||
0x1a: 'iso646str',
|
||||
0x1b: 'genstr',
|
||||
0x1c: 'unistr',
|
||||
0x1d: 'charstr',
|
||||
0x1e: 'bmpstr'
|
||||
};
|
||||
exports.tagByName = constants._reverse(exports.tag);
|
19
node_modules/asn1.js/lib/asn1/constants/index.js
generated
vendored
|
@ -1,19 +0,0 @@
|
|||
var constants = exports;
|
||||
|
||||
// Helper
|
||||
constants._reverse = function reverse(map) {
|
||||
var res = {};
|
||||
|
||||
Object.keys(map).forEach(function(key) {
|
||||
// Convert key to integer if it is stringified
|
||||
if ((key | 0) == key)
|
||||
key = key | 0;
|
||||
|
||||
var value = map[key];
|
||||
res[value] = key;
|
||||
});
|
||||
|
||||
return res;
|
||||
};
|
||||
|
||||
constants.der = require('./der');
|
324
node_modules/asn1.js/lib/asn1/decoders/der.js
generated
vendored
|
@ -1,324 +0,0 @@
|
|||
var inherits = require('inherits');
|
||||
|
||||
var asn1 = require('../../asn1');
|
||||
var base = asn1.base;
|
||||
var bignum = asn1.bignum;
|
||||
|
||||
// Import DER constants
|
||||
var der = asn1.constants.der;
|
||||
|
||||
function DERDecoder(entity) {
|
||||
this.enc = 'der';
|
||||
this.name = entity.name;
|
||||
this.entity = entity;
|
||||
|
||||
// Construct base tree
|
||||
this.tree = new DERNode();
|
||||
this.tree._init(entity.body);
|
||||
};
|
||||
module.exports = DERDecoder;
|
||||
|
||||
DERDecoder.prototype.decode = function decode(data, options) {
|
||||
if (!(data instanceof base.DecoderBuffer))
|
||||
data = new base.DecoderBuffer(data, options);
|
||||
|
||||
return this.tree._decode(data, options);
|
||||
};
|
||||
|
||||
// Tree methods
|
||||
|
||||
function DERNode(parent) {
|
||||
base.Node.call(this, 'der', parent);
|
||||
}
|
||||
inherits(DERNode, base.Node);
|
||||
|
||||
DERNode.prototype._peekTag = function peekTag(buffer, tag, any) {
|
||||
if (buffer.isEmpty())
|
||||
return false;
|
||||
|
||||
var state = buffer.save();
|
||||
var decodedTag = derDecodeTag(buffer, 'Failed to peek tag: "' + tag + '"');
|
||||
if (buffer.isError(decodedTag))
|
||||
return decodedTag;
|
||||
|
||||
buffer.restore(state);
|
||||
|
||||
return decodedTag.tag === tag || decodedTag.tagStr === tag ||
|
||||
(decodedTag.tagStr + 'of') === tag || any;
|
||||
};
|
||||
|
||||
DERNode.prototype._decodeTag = function decodeTag(buffer, tag, any) {
|
||||
var decodedTag = derDecodeTag(buffer,
|
||||
'Failed to decode tag of "' + tag + '"');
|
||||
if (buffer.isError(decodedTag))
|
||||
return decodedTag;
|
||||
|
||||
var len = derDecodeLen(buffer,
|
||||
decodedTag.primitive,
|
||||
'Failed to get length of "' + tag + '"');
|
||||
|
||||
// Failure
|
||||
if (buffer.isError(len))
|
||||
return len;
|
||||
|
||||
if (!any &&
|
||||
decodedTag.tag !== tag &&
|
||||
decodedTag.tagStr !== tag &&
|
||||
decodedTag.tagStr + 'of' !== tag) {
|
||||
return buffer.error('Failed to match tag: "' + tag + '"');
|
||||
}
|
||||
|
||||
if (decodedTag.primitive || len !== null)
|
||||
return buffer.skip(len, 'Failed to match body of: "' + tag + '"');
|
||||
|
||||
// Indefinite length... find END tag
|
||||
var state = buffer.save();
|
||||
var res = this._skipUntilEnd(
|
||||
buffer,
|
||||
'Failed to skip indefinite length body: "' + this.tag + '"');
|
||||
if (buffer.isError(res))
|
||||
return res;
|
||||
|
||||
len = buffer.offset - state.offset;
|
||||
buffer.restore(state);
|
||||
return buffer.skip(len, 'Failed to match body of: "' + tag + '"');
|
||||
};
|
||||
|
||||
DERNode.prototype._skipUntilEnd = function skipUntilEnd(buffer, fail) {
|
||||
while (true) {
|
||||
var tag = derDecodeTag(buffer, fail);
|
||||
if (buffer.isError(tag))
|
||||
return tag;
|
||||
var len = derDecodeLen(buffer, tag.primitive, fail);
|
||||
if (buffer.isError(len))
|
||||
return len;
|
||||
|
||||
var res;
|
||||
if (tag.primitive || len !== null)
|
||||
res = buffer.skip(len)
|
||||
else
|
||||
res = this._skipUntilEnd(buffer, fail);
|
||||
|
||||
// Failure
|
||||
if (buffer.isError(res))
|
||||
return res;
|
||||
|
||||
if (tag.tagStr === 'end')
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
DERNode.prototype._decodeList = function decodeList(buffer, tag, decoder,
|
||||
options) {
|
||||
var result = [];
|
||||
while (!buffer.isEmpty()) {
|
||||
var possibleEnd = this._peekTag(buffer, 'end');
|
||||
if (buffer.isError(possibleEnd))
|
||||
return possibleEnd;
|
||||
|
||||
var res = decoder.decode(buffer, 'der', options);
|
||||
if (buffer.isError(res) && possibleEnd)
|
||||
break;
|
||||
result.push(res);
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
DERNode.prototype._decodeStr = function decodeStr(buffer, tag) {
|
||||
if (tag === 'bitstr') {
|
||||
var unused = buffer.readUInt8();
|
||||
if (buffer.isError(unused))
|
||||
return unused;
|
||||
return { unused: unused, data: buffer.raw() };
|
||||
} else if (tag === 'bmpstr') {
|
||||
var raw = buffer.raw();
|
||||
if (raw.length % 2 === 1)
|
||||
return buffer.error('Decoding of string type: bmpstr length mismatch');
|
||||
|
||||
var str = '';
|
||||
for (var i = 0; i < raw.length / 2; i++) {
|
||||
str += String.fromCharCode(raw.readUInt16BE(i * 2));
|
||||
}
|
||||
return str;
|
||||
} else if (tag === 'numstr') {
|
||||
var numstr = buffer.raw().toString('ascii');
|
||||
if (!this._isNumstr(numstr)) {
|
||||
return buffer.error('Decoding of string type: ' +
|
||||
'numstr unsupported characters');
|
||||
}
|
||||
return numstr;
|
||||
} else if (tag === 'octstr') {
|
||||
return buffer.raw();
|
||||
} else if (tag === 'objDesc') {
|
||||
return buffer.raw();
|
||||
} else if (tag === 'printstr') {
|
||||
var printstr = buffer.raw().toString('ascii');
|
||||
if (!this._isPrintstr(printstr)) {
|
||||
return buffer.error('Decoding of string type: ' +
|
||||
'printstr unsupported characters');
|
||||
}
|
||||
return printstr;
|
||||
} else if (/str$/.test(tag)) {
|
||||
return buffer.raw().toString();
|
||||
} else {
|
||||
return buffer.error('Decoding of string type: ' + tag + ' unsupported');
|
||||
}
|
||||
};
|
||||
|
||||
DERNode.prototype._decodeObjid = function decodeObjid(buffer, values, relative) {
|
||||
var result;
|
||||
var identifiers = [];
|
||||
var ident = 0;
|
||||
while (!buffer.isEmpty()) {
|
||||
var subident = buffer.readUInt8();
|
||||
ident <<= 7;
|
||||
ident |= subident & 0x7f;
|
||||
if ((subident & 0x80) === 0) {
|
||||
identifiers.push(ident);
|
||||
ident = 0;
|
||||
}
|
||||
}
|
||||
if (subident & 0x80)
|
||||
identifiers.push(ident);
|
||||
|
||||
var first = (identifiers[0] / 40) | 0;
|
||||
var second = identifiers[0] % 40;
|
||||
|
||||
if (relative)
|
||||
result = identifiers;
|
||||
else
|
||||
result = [first, second].concat(identifiers.slice(1));
|
||||
|
||||
if (values) {
|
||||
var tmp = values[result.join(' ')];
|
||||
if (tmp === undefined)
|
||||
tmp = values[result.join('.')];
|
||||
if (tmp !== undefined)
|
||||
result = tmp;
|
||||
}
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
DERNode.prototype._decodeTime = function decodeTime(buffer, tag) {
|
||||
var str = buffer.raw().toString();
|
||||
if (tag === 'gentime') {
|
||||
var year = str.slice(0, 4) | 0;
|
||||
var mon = str.slice(4, 6) | 0;
|
||||
var day = str.slice(6, 8) | 0;
|
||||
var hour = str.slice(8, 10) | 0;
|
||||
var min = str.slice(10, 12) | 0;
|
||||
var sec = str.slice(12, 14) | 0;
|
||||
} else if (tag === 'utctime') {
|
||||
var year = str.slice(0, 2) | 0;
|
||||
var mon = str.slice(2, 4) | 0;
|
||||
var day = str.slice(4, 6) | 0;
|
||||
var hour = str.slice(6, 8) | 0;
|
||||
var min = str.slice(8, 10) | 0;
|
||||
var sec = str.slice(10, 12) | 0;
|
||||
if (year < 70)
|
||||
year = 2000 + year;
|
||||
else
|
||||
year = 1900 + year;
|
||||
} else {
|
||||
return buffer.error('Decoding ' + tag + ' time is not supported yet');
|
||||
}
|
||||
|
||||
return Date.UTC(year, mon - 1, day, hour, min, sec, 0);
|
||||
};
|
||||
|
||||
DERNode.prototype._decodeNull = function decodeNull(buffer) {
|
||||
return null;
|
||||
};
|
||||
|
||||
DERNode.prototype._decodeBool = function decodeBool(buffer) {
|
||||
var res = buffer.readUInt8();
|
||||
if (buffer.isError(res))
|
||||
return res;
|
||||
else
|
||||
return res !== 0;
|
||||
};
|
||||
|
||||
DERNode.prototype._decodeInt = function decodeInt(buffer, values) {
|
||||
// Bigint, return as it is (assume big endian)
|
||||
var raw = buffer.raw();
|
||||
var res = new bignum(raw);
|
||||
|
||||
if (values)
|
||||
res = values[res.toString(10)] || res;
|
||||
|
||||
return res;
|
||||
};
|
||||
|
||||
DERNode.prototype._use = function use(entity, obj) {
|
||||
if (typeof entity === 'function')
|
||||
entity = entity(obj);
|
||||
return entity._getDecoder('der').tree;
|
||||
};
|
||||
|
||||
// Utility methods
|
||||
|
||||
function derDecodeTag(buf, fail) {
|
||||
var tag = buf.readUInt8(fail);
|
||||
if (buf.isError(tag))
|
||||
return tag;
|
||||
|
||||
var cls = der.tagClass[tag >> 6];
|
||||
var primitive = (tag & 0x20) === 0;
|
||||
|
||||
// Multi-octet tag - load
|
||||
if ((tag & 0x1f) === 0x1f) {
|
||||
var oct = tag;
|
||||
tag = 0;
|
||||
while ((oct & 0x80) === 0x80) {
|
||||
oct = buf.readUInt8(fail);
|
||||
if (buf.isError(oct))
|
||||
return oct;
|
||||
|
||||
tag <<= 7;
|
||||
tag |= oct & 0x7f;
|
||||
}
|
||||
} else {
|
||||
tag &= 0x1f;
|
||||
}
|
||||
var tagStr = der.tag[tag];
|
||||
|
||||
return {
|
||||
cls: cls,
|
||||
primitive: primitive,
|
||||
tag: tag,
|
||||
tagStr: tagStr
|
||||
};
|
||||
}
|
||||
|
||||
function derDecodeLen(buf, primitive, fail) {
|
||||
var len = buf.readUInt8(fail);
|
||||
if (buf.isError(len))
|
||||
return len;
|
||||
|
||||
// Indefinite form
|
||||
if (!primitive && len === 0x80)
|
||||
return null;
|
||||
|
||||
// Definite form
|
||||
if ((len & 0x80) === 0) {
|
||||
// Short form
|
||||
return len;
|
||||
}
|
||||
|
||||
// Long form
|
||||
var num = len & 0x7f;
|
||||
if (num > 4)
|
||||
return buf.error('length octect is too long');
|
||||
|
||||
len = 0;
|
||||
for (var i = 0; i < num; i++) {
|
||||
len <<= 8;
|
||||
var j = buf.readUInt8(fail);
|
||||
if (buf.isError(j))
|
||||
return j;
|
||||
len |= j;
|
||||
}
|
||||
|
||||
return len;
|
||||
}
|
4
node_modules/asn1.js/lib/asn1/decoders/index.js
generated
vendored
|
@ -1,4 +0,0 @@
|
|||
var decoders = exports;
|
||||
|
||||
decoders.der = require('./der');
|
||||
decoders.pem = require('./pem');
|
49
node_modules/asn1.js/lib/asn1/decoders/pem.js
generated
vendored
|
@ -1,49 +0,0 @@
|
|||
var inherits = require('inherits');
|
||||
var Buffer = require('buffer').Buffer;
|
||||
|
||||
var DERDecoder = require('./der');
|
||||
|
||||
function PEMDecoder(entity) {
|
||||
DERDecoder.call(this, entity);
|
||||
this.enc = 'pem';
|
||||
};
|
||||
inherits(PEMDecoder, DERDecoder);
|
||||
module.exports = PEMDecoder;
|
||||
|
||||
PEMDecoder.prototype.decode = function decode(data, options) {
|
||||
var lines = data.toString().split(/[\r\n]+/g);
|
||||
|
||||
var label = options.label.toUpperCase();
|
||||
|
||||
var re = /^-----(BEGIN|END) ([^-]+)-----$/;
|
||||
var start = -1;
|
||||
var end = -1;
|
||||
for (var i = 0; i < lines.length; i++) {
|
||||
var match = lines[i].match(re);
|
||||
if (match === null)
|
||||
continue;
|
||||
|
||||
if (match[2] !== label)
|
||||
continue;
|
||||
|
||||
if (start === -1) {
|
||||
if (match[1] !== 'BEGIN')
|
||||
break;
|
||||
start = i;
|
||||
} else {
|
||||
if (match[1] !== 'END')
|
||||
break;
|
||||
end = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (start === -1 || end === -1)
|
||||
throw new Error('PEM section not found for: ' + label);
|
||||
|
||||
var base64 = lines.slice(start + 1, end).join('');
|
||||
// Remove excessive symbols
|
||||
base64.replace(/[^a-z0-9\+\/=]+/gi, '');
|
||||
|
||||
var input = new Buffer(base64, 'base64');
|
||||
return DERDecoder.prototype.decode.call(this, input, options);
|
||||
};
|
295
node_modules/asn1.js/lib/asn1/encoders/der.js
generated
vendored
|
@ -1,295 +0,0 @@
|
|||
var inherits = require('inherits');
|
||||
var Buffer = require('buffer').Buffer;
|
||||
|
||||
var asn1 = require('../../asn1');
|
||||
var base = asn1.base;
|
||||
|
||||
// Import DER constants
|
||||
var der = asn1.constants.der;
|
||||
|
||||
function DEREncoder(entity) {
|
||||
this.enc = 'der';
|
||||
this.name = entity.name;
|
||||
this.entity = entity;
|
||||
|
||||
// Construct base tree
|
||||
this.tree = new DERNode();
|
||||
this.tree._init(entity.body);
|
||||
};
|
||||
module.exports = DEREncoder;
|
||||
|
||||
DEREncoder.prototype.encode = function encode(data, reporter) {
|
||||
return this.tree._encode(data, reporter).join();
|
||||
};
|
||||
|
||||
// Tree methods
|
||||
|
||||
function DERNode(parent) {
|
||||
base.Node.call(this, 'der', parent);
|
||||
}
|
||||
inherits(DERNode, base.Node);
|
||||
|
||||
DERNode.prototype._encodeComposite = function encodeComposite(tag,
|
||||
primitive,
|
||||
cls,
|
||||
content) {
|
||||
var encodedTag = encodeTag(tag, primitive, cls, this.reporter);
|
||||
|
||||
// Short form
|
||||
if (content.length < 0x80) {
|
||||
var header = new Buffer(2);
|
||||
header[0] = encodedTag;
|
||||
header[1] = content.length;
|
||||
return this._createEncoderBuffer([ header, content ]);
|
||||
}
|
||||
|
||||
// Long form
|
||||
// Count octets required to store length
|
||||
var lenOctets = 1;
|
||||
for (var i = content.length; i >= 0x100; i >>= 8)
|
||||
lenOctets++;
|
||||
|
||||
var header = new Buffer(1 + 1 + lenOctets);
|
||||
header[0] = encodedTag;
|
||||
header[1] = 0x80 | lenOctets;
|
||||
|
||||
for (var i = 1 + lenOctets, j = content.length; j > 0; i--, j >>= 8)
|
||||
header[i] = j & 0xff;
|
||||
|
||||
return this._createEncoderBuffer([ header, content ]);
|
||||
};
|
||||
|
||||
DERNode.prototype._encodeStr = function encodeStr(str, tag) {
|
||||
if (tag === 'bitstr') {
|
||||
return this._createEncoderBuffer([ str.unused | 0, str.data ]);
|
||||
} else if (tag === 'bmpstr') {
|
||||
var buf = new Buffer(str.length * 2);
|
||||
for (var i = 0; i < str.length; i++) {
|
||||
buf.writeUInt16BE(str.charCodeAt(i), i * 2);
|
||||
}
|
||||
return this._createEncoderBuffer(buf);
|
||||
} else if (tag === 'numstr') {
|
||||
if (!this._isNumstr(str)) {
|
||||
return this.reporter.error('Encoding of string type: numstr supports ' +
|
||||
'only digits and space');
|
||||
}
|
||||
return this._createEncoderBuffer(str);
|
||||
} else if (tag === 'printstr') {
|
||||
if (!this._isPrintstr(str)) {
|
||||
return this.reporter.error('Encoding of string type: printstr supports ' +
|
||||
'only latin upper and lower case letters, ' +
|
||||
'digits, space, apostrophe, left and rigth ' +
|
||||
'parenthesis, plus sign, comma, hyphen, ' +
|
||||
'dot, slash, colon, equal sign, ' +
|
||||
'question mark');
|
||||
}
|
||||
return this._createEncoderBuffer(str);
|
||||
} else if (/str$/.test(tag)) {
|
||||
return this._createEncoderBuffer(str);
|
||||
} else if (tag === 'objDesc') {
|
||||
return this._createEncoderBuffer(str);
|
||||
} else {
|
||||
return this.reporter.error('Encoding of string type: ' + tag +
|
||||
' unsupported');
|
||||
}
|
||||
};
|
||||
|
||||
DERNode.prototype._encodeObjid = function encodeObjid(id, values, relative) {
|
||||
if (typeof id === 'string') {
|
||||
if (!values)
|
||||
return this.reporter.error('string objid given, but no values map found');
|
||||
if (!values.hasOwnProperty(id))
|
||||
return this.reporter.error('objid not found in values map');
|
||||
id = values[id].split(/[\s\.]+/g);
|
||||
for (var i = 0; i < id.length; i++)
|
||||
id[i] |= 0;
|
||||
} else if (Array.isArray(id)) {
|
||||
id = id.slice();
|
||||
for (var i = 0; i < id.length; i++)
|
||||
id[i] |= 0;
|
||||
}
|
||||
|
||||
if (!Array.isArray(id)) {
|
||||
return this.reporter.error('objid() should be either array or string, ' +
|
||||
'got: ' + JSON.stringify(id));
|
||||
}
|
||||
|
||||
if (!relative) {
|
||||
if (id[1] >= 40)
|
||||
return this.reporter.error('Second objid identifier OOB');
|
||||
id.splice(0, 2, id[0] * 40 + id[1]);
|
||||
}
|
||||
|
||||
// Count number of octets
|
||||
var size = 0;
|
||||
for (var i = 0; i < id.length; i++) {
|
||||
var ident = id[i];
|
||||
for (size++; ident >= 0x80; ident >>= 7)
|
||||
size++;
|
||||
}
|
||||
|
||||
var objid = new Buffer(size);
|
||||
var offset = objid.length - 1;
|
||||
for (var i = id.length - 1; i >= 0; i--) {
|
||||
var ident = id[i];
|
||||
objid[offset--] = ident & 0x7f;
|
||||
while ((ident >>= 7) > 0)
|
||||
objid[offset--] = 0x80 | (ident & 0x7f);
|
||||
}
|
||||
|
||||
return this._createEncoderBuffer(objid);
|
||||
};
|
||||
|
||||
function two(num) {
|
||||
if (num < 10)
|
||||
return '0' + num;
|
||||
else
|
||||
return num;
|
||||
}
|
||||
|
||||
DERNode.prototype._encodeTime = function encodeTime(time, tag) {
|
||||
var str;
|
||||
var date = new Date(time);
|
||||
|
||||
if (tag === 'gentime') {
|
||||
str = [
|
||||
two(date.getFullYear()),
|
||||
two(date.getUTCMonth() + 1),
|
||||
two(date.getUTCDate()),
|
||||
two(date.getUTCHours()),
|
||||
two(date.getUTCMinutes()),
|
||||
two(date.getUTCSeconds()),
|
||||
'Z'
|
||||
].join('');
|
||||
} else if (tag === 'utctime') {
|
||||
str = [
|
||||
two(date.getFullYear() % 100),
|
||||
two(date.getUTCMonth() + 1),
|
||||
two(date.getUTCDate()),
|
||||
two(date.getUTCHours()),
|
||||
two(date.getUTCMinutes()),
|
||||
two(date.getUTCSeconds()),
|
||||
'Z'
|
||||
].join('');
|
||||
} else {
|
||||
this.reporter.error('Encoding ' + tag + ' time is not supported yet');
|
||||
}
|
||||
|
||||
return this._encodeStr(str, 'octstr');
|
||||
};
|
||||
|
||||
DERNode.prototype._encodeNull = function encodeNull() {
|
||||
return this._createEncoderBuffer('');
|
||||
};
|
||||
|
||||
DERNode.prototype._encodeInt = function encodeInt(num, values) {
|
||||
if (typeof num === 'string') {
|
||||
if (!values)
|
||||
return this.reporter.error('String int or enum given, but no values map');
|
||||
if (!values.hasOwnProperty(num)) {
|
||||
return this.reporter.error('Values map doesn\'t contain: ' +
|
||||
JSON.stringify(num));
|
||||
}
|
||||
num = values[num];
|
||||
}
|
||||
|
||||
// Bignum, assume big endian
|
||||
if (typeof num !== 'number' && !Buffer.isBuffer(num)) {
|
||||
var numArray = num.toArray();
|
||||
if (!num.sign && numArray[0] & 0x80) {
|
||||
numArray.unshift(0);
|
||||
}
|
||||
num = new Buffer(numArray);
|
||||
}
|
||||
|
||||
if (Buffer.isBuffer(num)) {
|
||||
var size = num.length;
|
||||
if (num.length === 0)
|
||||
size++;
|
||||
|
||||
var out = new Buffer(size);
|
||||
num.copy(out);
|
||||
if (num.length === 0)
|
||||
out[0] = 0
|
||||
return this._createEncoderBuffer(out);
|
||||
}
|
||||
|
||||
if (num < 0x80)
|
||||
return this._createEncoderBuffer(num);
|
||||
|
||||
if (num < 0x100)
|
||||
return this._createEncoderBuffer([0, num]);
|
||||
|
||||
var size = 1;
|
||||
for (var i = num; i >= 0x100; i >>= 8)
|
||||
size++;
|
||||
|
||||
var out = new Array(size);
|
||||
for (var i = out.length - 1; i >= 0; i--) {
|
||||
out[i] = num & 0xff;
|
||||
num >>= 8;
|
||||
}
|
||||
if(out[0] & 0x80) {
|
||||
out.unshift(0);
|
||||
}
|
||||
|
||||
return this._createEncoderBuffer(new Buffer(out));
|
||||
};
|
||||
|
||||
DERNode.prototype._encodeBool = function encodeBool(value) {
|
||||
return this._createEncoderBuffer(value ? 0xff : 0);
|
||||
};
|
||||
|
||||
DERNode.prototype._use = function use(entity, obj) {
|
||||
if (typeof entity === 'function')
|
||||
entity = entity(obj);
|
||||
return entity._getEncoder('der').tree;
|
||||
};
|
||||
|
||||
DERNode.prototype._skipDefault = function skipDefault(dataBuffer, reporter, parent) {
|
||||
var state = this._baseState;
|
||||
var i;
|
||||
if (state['default'] === null)
|
||||
return false;
|
||||
|
||||
var data = dataBuffer.join();
|
||||
if (state.defaultBuffer === undefined)
|
||||
state.defaultBuffer = this._encodeValue(state['default'], reporter, parent).join();
|
||||
|
||||
if (data.length !== state.defaultBuffer.length)
|
||||
return false;
|
||||
|
||||
for (i=0; i < data.length; i++)
|
||||
if (data[i] !== state.defaultBuffer[i])
|
||||
return false;
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
// Utility methods
|
||||
|
||||
function encodeTag(tag, primitive, cls, reporter) {
|
||||
var res;
|
||||
|
||||
if (tag === 'seqof')
|
||||
tag = 'seq';
|
||||
else if (tag === 'setof')
|
||||
tag = 'set';
|
||||
|
||||
if (der.tagByName.hasOwnProperty(tag))
|
||||
res = der.tagByName[tag];
|
||||
else if (typeof tag === 'number' && (tag | 0) === tag)
|
||||
res = tag;
|
||||
else
|
||||
return reporter.error('Unknown tag: ' + tag);
|
||||
|
||||
if (res >= 0x1f)
|
||||
return reporter.error('Multi-octet tag encoding unsupported');
|
||||
|
||||
if (!primitive)
|
||||
res |= 0x20;
|
||||
|
||||
res |= (der.tagClassByName[cls || 'universal'] << 6);
|
||||
|
||||
return res;
|
||||
}
|
4
node_modules/asn1.js/lib/asn1/encoders/index.js
generated
vendored
|
@ -1,4 +0,0 @@
|
|||
var encoders = exports;
|
||||
|
||||
encoders.der = require('./der');
|
||||
encoders.pem = require('./pem');
|
21
node_modules/asn1.js/lib/asn1/encoders/pem.js
generated
vendored
|
@ -1,21 +0,0 @@
|
|||
var inherits = require('inherits');
|
||||
|
||||
var DEREncoder = require('./der');
|
||||
|
||||
function PEMEncoder(entity) {
|
||||
DEREncoder.call(this, entity);
|
||||
this.enc = 'pem';
|
||||
};
|
||||
inherits(PEMEncoder, DEREncoder);
|
||||
module.exports = PEMEncoder;
|
||||
|
||||
PEMEncoder.prototype.encode = function encode(data, options) {
|
||||
var buf = DEREncoder.prototype.encode.call(this, data);
|
||||
|
||||
var p = buf.toString('base64');
|
||||
var out = [ '-----BEGIN ' + options.label + '-----' ];
|
||||
for (var i = 0; i < p.length; i += 64)
|
||||
out.push(p.slice(i, i + 64));
|
||||
out.push('-----END ' + options.label + '-----');
|
||||
return out.join('\n');
|
||||
};
|
31
node_modules/asn1.js/package.json
generated
vendored
|
@ -1,31 +0,0 @@
|
|||
{
|
||||
"name": "asn1.js",
|
||||
"version": "4.10.1",
|
||||
"description": "ASN.1 encoder and decoder",
|
||||
"main": "lib/asn1.js",
|
||||
"scripts": {
|
||||
"test": "mocha --reporter spec test/*-test.js && cd rfc/2560 && npm i && npm test && cd ../../rfc/5280 && npm i && npm test"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git@github.com:indutny/asn1.js"
|
||||
},
|
||||
"keywords": [
|
||||
"asn.1",
|
||||
"der"
|
||||
],
|
||||
"author": "Fedor Indutny",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/indutny/asn1.js/issues"
|
||||
},
|
||||
"homepage": "https://github.com/indutny/asn1.js",
|
||||
"devDependencies": {
|
||||
"mocha": "^2.3.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"bn.js": "^4.0.0",
|
||||
"inherits": "^2.0.1",
|
||||
"minimalistic-assert": "^1.0.0"
|
||||
}
|
||||
}
|
342
node_modules/async/CHANGELOG.md
generated
vendored
|
@ -1,43 +1,269 @@
|
|||
# v3.2.5
|
||||
- Ensure `Error` objects such as `AggregateError` are propagated without modification (#1920)
|
||||
|
||||
# v3.2.4
|
||||
- Fix a bug in `priorityQueue` where it didn't wait for the result. (#1725)
|
||||
- Fix a bug where `unshiftAsync` was included in `priorityQueue`. (#1790)
|
||||
|
||||
# v3.2.3
|
||||
- Fix bugs in comment parsing in `autoInject`. (#1767, #1780)
|
||||
|
||||
# v3.2.2
|
||||
- Fix potential prototype pollution exploit
|
||||
|
||||
# v3.2.1
|
||||
- Use `queueMicrotask` if available to the environment (#1761)
|
||||
- Minor perf improvement in `priorityQueue` (#1727)
|
||||
- More examples in documentation (#1726)
|
||||
- Various doc fixes (#1708, #1712, #1717, #1740, #1739, #1749, #1756)
|
||||
- Improved test coverage (#1754)
|
||||
|
||||
# v3.2.0
|
||||
- Fix a bug in Safari related to overwriting `func.name`
|
||||
- Remove built-in browserify configuration (#1653)
|
||||
- Varios doc fixes (#1688, #1703, #1704)
|
||||
|
||||
# v3.1.1
|
||||
- Allow redefining `name` property on wrapped functions.
|
||||
|
||||
# v3.1.0
|
||||
|
||||
- Added `q.pushAsync` and `q.unshiftAsync`, analagous to `q.push` and `q.unshift`, except they always do not accept a callback, and reject if processing the task errors. (#1659)
|
||||
- Promises returned from `q.push` and `q.unshift` when a callback is not passed now resolve even if an error ocurred. (#1659)
|
||||
- Fixed a parsing bug in `autoInject` with complicated function bodies (#1663)
|
||||
- Added ES6+ configuration for Browserify bundlers (#1653)
|
||||
- Various doc fixes (#1664, #1658, #1665, #1652)
|
||||
|
||||
# v3.0.1
|
||||
|
||||
## Bug fixes
|
||||
- Fixed a regression where arrays passed to `queue` and `cargo` would be completely flattened. (#1645)
|
||||
- Clarified Async's browser support (#1643)
|
||||
|
||||
|
||||
# v3.0.0
|
||||
|
||||
The `async`/`await` release!
|
||||
|
||||
There are a lot of new features and subtle breaking changes in this major version, but the biggest feature is that most Async methods return a Promise if you omit the callback, meaning you can `await` them from within an `async` function.
|
||||
|
||||
```js
|
||||
const results = await async.mapLimit(urls, 5, async url => {
|
||||
const resp = await fetch(url)
|
||||
return resp.body
|
||||
})
|
||||
```
|
||||
|
||||
## Breaking Changes
|
||||
- Most Async methods return a Promise when the final callback is omitted, making them `await`-able! (#1572)
|
||||
- We are now making heavy use of ES2015 features, this means we have dropped out-of-the-box support for Node 4 and earlier, and many old versions of browsers. (#1541, #1553)
|
||||
- In `queue`, `priorityQueue`, `cargo` and `cargoQueue`, the "event"-style methods, like `q.drain` and `q.saturated` are now methods that register a callback, rather than properties you assign a callback to. They are now of the form `q.drain(callback)`. If you do not pass a callback a Promise will be returned for the next occurrence of the event, making them `await`-able, e.g. `await q.drain()`. (#1586, #1641)
|
||||
- Calling `callback(false)` will cancel an async method, preventing further iteration and callback calls. This is useful for preventing memory leaks when you break out of an async flow by calling an outer callback. (#1064, #1542)
|
||||
- `during` and `doDuring` have been removed, and instead `whilst`, `doWhilst`, `until` and `doUntil` now have asynchronous `test` functions. (#850, #1557)
|
||||
- `limits` of less than 1 now cause an error to be thrown in queues and collection methods. (#1249, #1552)
|
||||
- `memoize` no longer memoizes errors (#1465, #1466)
|
||||
- `applyEach`/`applyEachSeries` have a simpler interface, to make them more easily type-able. It always returns a function that takes in a single callback argument. If that callback is omitted, a promise is returned, making it awaitable. (#1228, #1640)
|
||||
|
||||
## New Features
|
||||
- Async generators are now supported in all the Collection methods. (#1560)
|
||||
- Added `cargoQueue`, a queue with both `concurrency` and `payload` size parameters. (#1567)
|
||||
- Queue objects returned from `queue` now have a `Symbol.iterator` method, meaning they can be iterated over to inspect the current list of items in the queue. (#1459, #1556)
|
||||
- A ESM-flavored `async.mjs` is included in the `async` package. This is described in the `package.json` `"module"` field, meaning it should be automatically used by Webpack and other compatible bundlers.
|
||||
|
||||
## Bug fixes
|
||||
- Better handle arbitrary error objects in `asyncify` (#1568, #1569)
|
||||
|
||||
## Other
|
||||
- Removed Lodash as a dependency (#1283, #1528)
|
||||
- Miscellaneous docs fixes (#1393, #1501, #1540, #1543, #1558, #1563, #1564, #1579, #1581)
|
||||
- Miscellaneous test fixes (#1538)
|
||||
|
||||
-------
|
||||
|
||||
# v2.6.1
|
||||
- Updated lodash to prevent `npm audit` warnings. (#1532, #1533)
|
||||
- Made `async-es` more optimized for webpack users (#1517)
|
||||
- Fixed a stack overflow with large collections and a synchronous iterator (#1514)
|
||||
- Various small fixes/chores (#1505, #1511, #1527, #1530)
|
||||
|
||||
# v2.6.0
|
||||
- Added missing aliases for many methods. Previously, you could not (e.g.) `require('async/find')` or use `async.anyLimit`. (#1483)
|
||||
- Improved `queue` performance. (#1448, #1454)
|
||||
- Add missing sourcemap (#1452, #1453)
|
||||
- Various doc updates (#1448, #1471, #1483)
|
||||
|
||||
# v2.5.0
|
||||
- Added `concatLimit`, the `Limit` equivalent of [`concat`](https://caolan.github.io/async/docs.html#concat) ([#1426](https://github.com/caolan/async/issues/1426), [#1430](https://github.com/caolan/async/pull/1430))
|
||||
- `concat` improvements: it now preserves order, handles falsy values and the `iteratee` callback takes a variable number of arguments ([#1437](https://github.com/caolan/async/issues/1437), [#1436](https://github.com/caolan/async/pull/1436))
|
||||
- Fixed an issue in `queue` where there was a size discrepancy between `workersList().length` and `running()` ([#1428](https://github.com/caolan/async/issues/1428), [#1429](https://github.com/caolan/async/pull/1429))
|
||||
- Various doc fixes ([#1422](https://github.com/caolan/async/issues/1422), [#1424](https://github.com/caolan/async/pull/1424))
|
||||
|
||||
# v2.4.1
|
||||
- Fixed a bug preventing functions wrapped with `timeout()` from being re-used. ([#1418](https://github.com/caolan/async/issues/1418), [#1419](https://github.com/caolan/async/issues/1419))
|
||||
|
||||
# v2.4.0
|
||||
- Added `tryEach`, for running async functions in parallel, where you only expect one to succeed. ([#1365](https://github.com/caolan/async/issues/1365), [#687](https://github.com/caolan/async/issues/687))
|
||||
- Improved performance, most notably in `parallel` and `waterfall` ([#1395](https://github.com/caolan/async/issues/1395))
|
||||
- Added `queue.remove()`, for removing items in a `queue` ([#1397](https://github.com/caolan/async/issues/1397), [#1391](https://github.com/caolan/async/issues/1391))
|
||||
- Fixed using `eval`, preventing Async from running in pages with Content Security Policy ([#1404](https://github.com/caolan/async/issues/1404), [#1403](https://github.com/caolan/async/issues/1403))
|
||||
- Fixed errors thrown in an `asyncify`ed function's callback being caught by the underlying Promise ([#1408](https://github.com/caolan/async/issues/1408))
|
||||
- Fixed timing of `queue.empty()` ([#1367](https://github.com/caolan/async/issues/1367))
|
||||
- Various doc fixes ([#1314](https://github.com/caolan/async/issues/1314), [#1394](https://github.com/caolan/async/issues/1394), [#1412](https://github.com/caolan/async/issues/1412))
|
||||
|
||||
# v2.3.0
|
||||
- Added support for ES2017 `async` functions. Wherever you can pass a Node-style/CPS function that uses a callback, you can also pass an `async` function. Previously, you had to wrap `async` functions with `asyncify`. The caveat is that it will only work if `async` functions are supported natively in your environment, transpiled implementations can't be detected. ([#1386](https://github.com/caolan/async/issues/1386), [#1390](https://github.com/caolan/async/issues/1390))
|
||||
- Small doc fix ([#1392](https://github.com/caolan/async/issues/1392))
|
||||
|
||||
# v2.2.0
|
||||
- Added `groupBy`, and the `Series`/`Limit` equivalents, analogous to [`_.groupBy`](http://lodash.com/docs#groupBy) ([#1364](https://github.com/caolan/async/issues/1364))
|
||||
- Fixed `transform` bug when `callback` was not passed ([#1381](https://github.com/caolan/async/issues/1381))
|
||||
- Added note about `reflect` to `parallel` docs ([#1385](https://github.com/caolan/async/issues/1385))
|
||||
|
||||
# v2.1.5
|
||||
- Fix `auto` bug when function names collided with Array.prototype ([#1358](https://github.com/caolan/async/issues/1358))
|
||||
- Improve some error messages ([#1349](https://github.com/caolan/async/issues/1349))
|
||||
- Avoid stack overflow case in queue
|
||||
- Fixed an issue in `some`, `every` and `find` where processing would continue after the result was determined.
|
||||
- Cleanup implementations of `some`, `every` and `find`
|
||||
|
||||
# v2.1.3
|
||||
- Make bundle size smaller
|
||||
- Create optimized hotpath for `filter` in array case.
|
||||
|
||||
# v2.1.2
|
||||
- Fixed a stackoverflow bug with `detect`, `some`, `every` on large inputs ([#1293](https://github.com/caolan/async/issues/1293)).
|
||||
|
||||
# v2.1.0
|
||||
|
||||
- `retry` and `retryable` now support an optional `errorFilter` function that determines if the `task` should retry on the error ([#1256](https://github.com/caolan/async/issues/1256), [#1261](https://github.com/caolan/async/issues/1261))
|
||||
- Optimized array iteration in `race`, `cargo`, `queue`, and `priorityQueue` ([#1253](https://github.com/caolan/async/issues/1253))
|
||||
- Added alias documentation to doc site ([#1251](https://github.com/caolan/async/issues/1251), [#1254](https://github.com/caolan/async/issues/1254))
|
||||
- Added [BootStrap scrollspy](http://getbootstrap.com/javascript/#scrollspy) to docs to highlight in the sidebar the current method being viewed ([#1289](https://github.com/caolan/async/issues/1289), [#1300](https://github.com/caolan/async/issues/1300))
|
||||
- Various minor doc fixes ([#1263](https://github.com/caolan/async/issues/1263), [#1264](https://github.com/caolan/async/issues/1264), [#1271](https://github.com/caolan/async/issues/1271), [#1278](https://github.com/caolan/async/issues/1278), [#1280](https://github.com/caolan/async/issues/1280), [#1282](https://github.com/caolan/async/issues/1282), [#1302](https://github.com/caolan/async/issues/1302))
|
||||
|
||||
# v2.0.1
|
||||
|
||||
- Significantly optimized all iteration based collection methods such as `each`, `map`, `filter`, etc ([#1245](https://github.com/caolan/async/issues/1245), [#1246](https://github.com/caolan/async/issues/1246), [#1247](https://github.com/caolan/async/issues/1247)).
|
||||
|
||||
# v2.0.0
|
||||
|
||||
Lots of changes here!
|
||||
|
||||
First and foremost, we have a slick new [site for docs](https://caolan.github.io/async/). Special thanks to [**@hargasinski**](https://github.com/hargasinski) for his work converting our old docs to `jsdoc` format and implementing the new website. Also huge ups to [**@ivanseidel**](https://github.com/ivanseidel) for designing our new logo. It was a long process for both of these tasks, but I think these changes turned out extraordinary well.
|
||||
|
||||
The biggest feature is modularization. You can now `require("async/series")` to only require the `series` function. Every Async library function is available this way. You still can `require("async")` to require the entire library, like you could do before.
|
||||
|
||||
We also provide Async as a collection of ES2015 modules. You can now `import {each} from 'async-es'` or `import waterfall from 'async-es/waterfall'`. If you are using only a few Async functions, and are using a ES bundler such as Rollup, this can significantly lower your build size.
|
||||
|
||||
Major thanks to [**@Kikobeats**](github.com/Kikobeats), [**@aearly**](github.com/aearly) and [**@megawac**](github.com/megawac) for doing the majority of the modularization work, as well as [**@jdalton**](github.com/jdalton) and [**@Rich-Harris**](github.com/Rich-Harris) for advisory work on the general modularization strategy.
|
||||
|
||||
Another one of the general themes of the 2.0 release is standardization of what an "async" function is. We are now more strictly following the node-style continuation passing style. That is, an async function is a function that:
|
||||
|
||||
1. Takes a variable number of arguments
|
||||
2. The last argument is always a callback
|
||||
3. The callback can accept any number of arguments
|
||||
4. The first argument passed to the callback will be treated as an error result, if the argument is truthy
|
||||
5. Any number of result arguments can be passed after the "error" argument
|
||||
6. The callback is called once and exactly once, either on the same tick or later tick of the JavaScript event loop.
|
||||
|
||||
There were several cases where Async accepted some functions that did not strictly have these properties, most notably `auto`, `every`, `some`, `filter`, `reject` and `detect`.
|
||||
|
||||
Another theme is performance. We have eliminated internal deferrals in all cases where they make sense. For example, in `waterfall` and `auto`, there was a `setImmediate` between each task -- these deferrals have been removed. A `setImmediate` call can add up to 1ms of delay. This might not seem like a lot, but it can add up if you are using many Async functions in the course of processing a HTTP request, for example. Nearly all asynchronous functions that do I/O already have some sort of deferral built in, so the extra deferral is unnecessary. The trade-off of this change is removing our built-in stack-overflow defense. Many synchronous callback calls in series can quickly overflow the JS call stack. If you do have a function that is sometimes synchronous (calling its callback on the same tick), and are running into stack overflows, wrap it with `async.ensureAsync()`.
|
||||
|
||||
Another big performance win has been re-implementing `queue`, `cargo`, and `priorityQueue` with [doubly linked lists](https://en.wikipedia.org/wiki/Doubly_linked_list) instead of arrays. This has lead to queues being an order of [magnitude faster on large sets of tasks](https://github.com/caolan/async/pull/1205).
|
||||
|
||||
## New Features
|
||||
|
||||
- Async is now modularized. Individual functions can be `require()`d from the main package. (`require('async/auto')`) ([#984](https://github.com/caolan/async/issues/984), [#996](https://github.com/caolan/async/issues/996))
|
||||
- Async is also available as a collection of ES2015 modules in the new `async-es` package. (`import {forEachSeries} from 'async-es'`) ([#984](https://github.com/caolan/async/issues/984), [#996](https://github.com/caolan/async/issues/996))
|
||||
- Added `race`, analogous to `Promise.race()`. It will run an array of async tasks in parallel and will call its callback with the result of the first task to respond. ([#568](https://github.com/caolan/async/issues/568), [#1038](https://github.com/caolan/async/issues/1038))
|
||||
- Collection methods now accept ES2015 iterators. Maps, Sets, and anything that implements the iterator spec can now be passed directly to `each`, `map`, `parallel`, etc.. ([#579](https://github.com/caolan/async/issues/579), [#839](https://github.com/caolan/async/issues/839), [#1074](https://github.com/caolan/async/issues/1074))
|
||||
- Added `mapValues`, for mapping over the properties of an object and returning an object with the same keys. ([#1157](https://github.com/caolan/async/issues/1157), [#1177](https://github.com/caolan/async/issues/1177))
|
||||
- Added `timeout`, a wrapper for an async function that will make the task time-out after the specified time. ([#1007](https://github.com/caolan/async/issues/1007), [#1027](https://github.com/caolan/async/issues/1027))
|
||||
- Added `reflect` and `reflectAll`, analagous to [`Promise.reflect()`](http://bluebirdjs.com/docs/api/reflect.html), a wrapper for async tasks that always succeeds, by gathering results and errors into an object. ([#942](https://github.com/caolan/async/issues/942), [#1012](https://github.com/caolan/async/issues/1012), [#1095](https://github.com/caolan/async/issues/1095))
|
||||
- `constant` supports dynamic arguments -- it will now always use its last argument as the callback. ([#1016](https://github.com/caolan/async/issues/1016), [#1052](https://github.com/caolan/async/issues/1052))
|
||||
- `setImmediate` and `nextTick` now support arguments to partially apply to the deferred function, like the node-native versions do. ([#940](https://github.com/caolan/async/issues/940), [#1053](https://github.com/caolan/async/issues/1053))
|
||||
- `auto` now supports resolving cyclic dependencies using [Kahn's algorithm](https://en.wikipedia.org/wiki/Topological_sorting#Kahn.27s_algorithm) ([#1140](https://github.com/caolan/async/issues/1140)).
|
||||
- Added `autoInject`, a relative of `auto` that automatically spreads a task's dependencies as arguments to the task function. ([#608](https://github.com/caolan/async/issues/608), [#1055](https://github.com/caolan/async/issues/1055), [#1099](https://github.com/caolan/async/issues/1099), [#1100](https://github.com/caolan/async/issues/1100))
|
||||
- You can now limit the concurrency of `auto` tasks. ([#635](https://github.com/caolan/async/issues/635), [#637](https://github.com/caolan/async/issues/637))
|
||||
- Added `retryable`, a relative of `retry` that wraps an async function, making it retry when called. ([#1058](https://github.com/caolan/async/issues/1058))
|
||||
- `retry` now supports specifying a function that determines the next time interval, useful for exponential backoff, logging and other retry strategies. ([#1161](https://github.com/caolan/async/issues/1161))
|
||||
- `retry` will now pass all of the arguments the task function was resolved with to the callback ([#1231](https://github.com/caolan/async/issues/1231)).
|
||||
- Added `q.unsaturated` -- callback called when a `queue`'s number of running workers falls below a threshold. ([#868](https://github.com/caolan/async/issues/868), [#1030](https://github.com/caolan/async/issues/1030), [#1033](https://github.com/caolan/async/issues/1033), [#1034](https://github.com/caolan/async/issues/1034))
|
||||
- Added `q.error` -- a callback called whenever a `queue` task calls its callback with an error. ([#1170](https://github.com/caolan/async/issues/1170))
|
||||
- `applyEach` and `applyEachSeries` now pass results to the final callback. ([#1088](https://github.com/caolan/async/issues/1088))
|
||||
|
||||
## Breaking changes
|
||||
|
||||
- Calling a callback more than once is considered an error, and an error will be thrown. This had an explicit breaking change in `waterfall`. If you were relying on this behavior, you should more accurately represent your control flow as an event emitter or stream. ([#814](https://github.com/caolan/async/issues/814), [#815](https://github.com/caolan/async/issues/815), [#1048](https://github.com/caolan/async/issues/1048), [#1050](https://github.com/caolan/async/issues/1050))
|
||||
- `auto` task functions now always take the callback as the last argument. If a task has dependencies, the `results` object will be passed as the first argument. To migrate old task functions, wrap them with [`_.flip`](https://lodash.com/docs#flip) ([#1036](https://github.com/caolan/async/issues/1036), [#1042](https://github.com/caolan/async/issues/1042))
|
||||
- Internal `setImmediate` calls have been refactored away. This may make existing flows vulnerable to stack overflows if you use many synchronous functions in series. Use `ensureAsync` to work around this. ([#696](https://github.com/caolan/async/issues/696), [#704](https://github.com/caolan/async/issues/704), [#1049](https://github.com/caolan/async/issues/1049), [#1050](https://github.com/caolan/async/issues/1050))
|
||||
- `map` used to return an object when iterating over an object. `map` now always returns an array, like in other libraries. The previous object behavior has been split out into `mapValues`. ([#1157](https://github.com/caolan/async/issues/1157), [#1177](https://github.com/caolan/async/issues/1177))
|
||||
- `filter`, `reject`, `some`, `every`, `detect` and their families like `{METHOD}Series` and `{METHOD}Limit` now expect an error as the first callback argument, rather than just a simple boolean. Pass `null` as the first argument, or use `fs.access` instead of `fs.exists`. ([#118](https://github.com/caolan/async/issues/118), [#774](https://github.com/caolan/async/issues/774), [#1028](https://github.com/caolan/async/issues/1028), [#1041](https://github.com/caolan/async/issues/1041))
|
||||
- `{METHOD}` and `{METHOD}Series` are now implemented in terms of `{METHOD}Limit`. This is a major internal simplification, and is not expected to cause many problems, but it does subtly affect how functions execute internally. ([#778](https://github.com/caolan/async/issues/778), [#847](https://github.com/caolan/async/issues/847))
|
||||
- `retry`'s callback is now optional. Previously, omitting the callback would partially apply the function, meaning it could be passed directly as a task to `series` or `auto`. The partially applied "control-flow" behavior has been separated out into `retryable`. ([#1054](https://github.com/caolan/async/issues/1054), [#1058](https://github.com/caolan/async/issues/1058))
|
||||
- The test function for `whilst`, `until`, and `during` used to be passed non-error args from the iteratee function's callback, but this led to weirdness where the first call of the test function would be passed no args. We have made it so the test function is never passed extra arguments, and only the `doWhilst`, `doUntil`, and `doDuring` functions pass iteratee callback arguments to the test function ([#1217](https://github.com/caolan/async/issues/1217), [#1224](https://github.com/caolan/async/issues/1224))
|
||||
- The `q.tasks` array has been renamed `q._tasks` and is now implemented as a doubly linked list (DLL). Any code that used to interact with this array will need to be updated to either use the provided helpers or support DLLs ([#1205](https://github.com/caolan/async/issues/1205)).
|
||||
- The timing of the `q.saturated()` callback in a `queue` has been modified to better reflect when tasks pushed to the queue will start queueing. ([#724](https://github.com/caolan/async/issues/724), [#1078](https://github.com/caolan/async/issues/1078))
|
||||
- Removed `iterator` method in favour of [ES2015 iterator protocol](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Iterators_and_Generators ) which natively supports arrays ([#1237](https://github.com/caolan/async/issues/1237))
|
||||
- Dropped support for Component, Jam, SPM, and Volo ([#1175](https://github.com/caolan/async/issues/1175), #[#176](https://github.com/caolan/async/issues/176))
|
||||
|
||||
## Bug Fixes
|
||||
|
||||
- Improved handling of no dependency cases in `auto` & `autoInject` ([#1147](https://github.com/caolan/async/issues/1147)).
|
||||
- Fixed a bug where the callback generated by `asyncify` with `Promises` could resolve twice ([#1197](https://github.com/caolan/async/issues/1197)).
|
||||
- Fixed several documented optional callbacks not actually being optional ([#1223](https://github.com/caolan/async/issues/1223)).
|
||||
|
||||
## Other
|
||||
|
||||
- Added `someSeries` and `everySeries` for symmetry, as well as a complete set of `any`/`anyLimit`/`anySeries` and `all`/`/allLmit`/`allSeries` aliases.
|
||||
- Added `find` as an alias for `detect. (as well as `findLimit` and `findSeries`).
|
||||
- Various doc fixes ([#1005](https://github.com/caolan/async/issues/1005), [#1008](https://github.com/caolan/async/issues/1008), [#1010](https://github.com/caolan/async/issues/1010), [#1015](https://github.com/caolan/async/issues/1015), [#1021](https://github.com/caolan/async/issues/1021), [#1037](https://github.com/caolan/async/issues/1037), [#1039](https://github.com/caolan/async/issues/1039), [#1051](https://github.com/caolan/async/issues/1051), [#1102](https://github.com/caolan/async/issues/1102), [#1107](https://github.com/caolan/async/issues/1107), [#1121](https://github.com/caolan/async/issues/1121), [#1123](https://github.com/caolan/async/issues/1123), [#1129](https://github.com/caolan/async/issues/1129), [#1135](https://github.com/caolan/async/issues/1135), [#1138](https://github.com/caolan/async/issues/1138), [#1141](https://github.com/caolan/async/issues/1141), [#1153](https://github.com/caolan/async/issues/1153), [#1216](https://github.com/caolan/async/issues/1216), [#1217](https://github.com/caolan/async/issues/1217), [#1232](https://github.com/caolan/async/issues/1232), [#1233](https://github.com/caolan/async/issues/1233), [#1236](https://github.com/caolan/async/issues/1236), [#1238](https://github.com/caolan/async/issues/1238))
|
||||
|
||||
Thank you [**@aearly**](github.com/aearly) and [**@megawac**](github.com/megawac) for taking the lead on version 2 of async.
|
||||
|
||||
------------------------------------------
|
||||
|
||||
# v1.5.2
|
||||
- Allow using `"consructor"` as an argument in `memoize` (#998)
|
||||
- Give a better error messsage when `auto` dependency checking fails (#994)
|
||||
- Various doc updates (#936, #956, #979, #1002)
|
||||
- Allow using `"constructor"` as an argument in `memoize` ([#998](https://github.com/caolan/async/issues/998))
|
||||
- Give a better error messsage when `auto` dependency checking fails ([#994](https://github.com/caolan/async/issues/994))
|
||||
- Various doc updates ([#936](https://github.com/caolan/async/issues/936), [#956](https://github.com/caolan/async/issues/956), [#979](https://github.com/caolan/async/issues/979), [#1002](https://github.com/caolan/async/issues/1002))
|
||||
|
||||
# v1.5.1
|
||||
- Fix issue with `pause` in `queue` with concurrency enabled (#946)
|
||||
- `while` and `until` now pass the final result to callback (#963)
|
||||
- `auto` will properly handle concurrency when there is no callback (#966)
|
||||
- `auto` will now properly stop execution when an error occurs (#988, #993)
|
||||
- Various doc fixes (#971, #980)
|
||||
- Fix issue with `pause` in `queue` with concurrency enabled ([#946](https://github.com/caolan/async/issues/946))
|
||||
- `while` and `until` now pass the final result to callback ([#963](https://github.com/caolan/async/issues/963))
|
||||
- `auto` will properly handle concurrency when there is no callback ([#966](https://github.com/caolan/async/issues/966))
|
||||
- `auto` will no. properly stop execution when an error occurs ([#988](https://github.com/caolan/async/issues/988), [#993](https://github.com/caolan/async/issues/993))
|
||||
- Various doc fixes ([#971](https://github.com/caolan/async/issues/971), [#980](https://github.com/caolan/async/issues/980))
|
||||
|
||||
# v1.5.0
|
||||
|
||||
- Added `transform`, analogous to [`_.transform`](http://lodash.com/docs#transform) (#892)
|
||||
- `map` now returns an object when an object is passed in, rather than array with non-numeric keys. `map` will begin always returning an array with numeric indexes in the next major release. (#873)
|
||||
- `auto` now accepts an optional `concurrency` argument to limit the number of running tasks (#637)
|
||||
- Added `queue#workersList()`, to retrieve the list of currently running tasks. (#891)
|
||||
- Various code simplifications (#896, #904)
|
||||
- Various doc fixes :scroll: (#890, #894, #903, #905, #912)
|
||||
- Added `transform`, analogous to [`_.transform`](http://lodash.com/docs#transform) ([#892](https://github.com/caolan/async/issues/892))
|
||||
- `map` now returns an object when an object is passed in, rather than array with non-numeric keys. `map` will begin always returning an array with numeric indexes in the next major release. ([#873](https://github.com/caolan/async/issues/873))
|
||||
- `auto` now accepts an optional `concurrency` argument to limit the number o. running tasks ([#637](https://github.com/caolan/async/issues/637))
|
||||
- Added `queue#workersList()`, to retrieve the lis. of currently running tasks. ([#891](https://github.com/caolan/async/issues/891))
|
||||
- Various code simplifications ([#896](https://github.com/caolan/async/issues/896), [#904](https://github.com/caolan/async/issues/904))
|
||||
- Various doc fixes :scroll: ([#890](https://github.com/caolan/async/issues/890), [#894](https://github.com/caolan/async/issues/894), [#903](https://github.com/caolan/async/issues/903), [#905](https://github.com/caolan/async/issues/905), [#912](https://github.com/caolan/async/issues/912))
|
||||
|
||||
# v1.4.2
|
||||
|
||||
- Ensure coverage files don't get published on npm (#879)
|
||||
- Ensure coverage files don't get published on npm ([#879](https://github.com/caolan/async/issues/879))
|
||||
|
||||
# v1.4.1
|
||||
|
||||
- Add in overlooked `detectLimit` method (#866)
|
||||
- Removed unnecessary files from npm releases (#861)
|
||||
- Removed usage of a reserved word to prevent :boom: in older environments (#870)
|
||||
- Add in overlooked `detectLimit` method ([#866](https://github.com/caolan/async/issues/866))
|
||||
- Removed unnecessary files from npm releases ([#861](https://github.com/caolan/async/issues/861))
|
||||
- Removed usage of a reserved word to prevent :boom: in older environments ([#870](https://github.com/caolan/async/issues/870))
|
||||
|
||||
# v1.4.0
|
||||
|
||||
- `asyncify` now supports promises (#840)
|
||||
- Added `Limit` versions of `filter` and `reject` (#836)
|
||||
- Add `Limit` versions of `detect`, `some` and `every` (#828, #829)
|
||||
- `some`, `every` and `detect` now short circuit early (#828, #829)
|
||||
- Improve detection of the global object (#804), enabling use in WebWorkers
|
||||
- `whilst` now called with arguments from iterator (#823)
|
||||
- `during` now gets called with arguments from iterator (#824)
|
||||
- `asyncify` now supports promises ([#840](https://github.com/caolan/async/issues/840))
|
||||
- Added `Limit` versions of `filter` and `reject` ([#836](https://github.com/caolan/async/issues/836))
|
||||
- Add `Limit` versions of `detect`, `some` and `every` ([#828](https://github.com/caolan/async/issues/828), [#829](https://github.com/caolan/async/issues/829))
|
||||
- `some`, `every` and `detect` now short circuit early ([#828](https://github.com/caolan/async/issues/828), [#829](https://github.com/caolan/async/issues/829))
|
||||
- Improve detection of the global object ([#804](https://github.com/caolan/async/issues/804)), enabling use in WebWorkers
|
||||
- `whilst` now called with arguments from iterator ([#823](https://github.com/caolan/async/issues/823))
|
||||
- `during` now gets called with arguments from iterator ([#824](https://github.com/caolan/async/issues/824))
|
||||
- Code simplifications and optimizations aplenty ([diff](https://github.com/caolan/async/compare/v1.3.0...v1.4.0))
|
||||
|
||||
|
||||
|
@ -45,42 +271,42 @@
|
|||
|
||||
New Features:
|
||||
- Added `constant`
|
||||
- Added `asyncify`/`wrapSync` for making sync functions work with callbacks. (#671, #806)
|
||||
- Added `during` and `doDuring`, which are like `whilst` with an async truth test. (#800)
|
||||
- `retry` now accepts an `interval` parameter to specify a delay between retries. (#793)
|
||||
- `async` should work better in Web Workers due to better `root` detection (#804)
|
||||
- Callbacks are now optional in `whilst`, `doWhilst`, `until`, and `doUntil` (#642)
|
||||
- Various internal updates (#786, #801, #802, #803)
|
||||
- Various doc fixes (#790, #794)
|
||||
- Added `asyncify`/`wrapSync` for making sync functions work with callbacks. ([#671](https://github.com/caolan/async/issues/671), [#806](https://github.com/caolan/async/issues/806))
|
||||
- Added `during` and `doDuring`, which are like `whilst` with an async truth test. ([#800](https://github.com/caolan/async/issues/800))
|
||||
- `retry` now accepts an `interval` parameter to specify a delay between retries. ([#793](https://github.com/caolan/async/issues/793))
|
||||
- `async` should work better in Web Workers due to better `root` detection ([#804](https://github.com/caolan/async/issues/804))
|
||||
- Callbacks are now optional in `whilst`, `doWhilst`, `until`, and `doUntil` ([#642](https://github.com/caolan/async/issues/642))
|
||||
- Various internal updates ([#786](https://github.com/caolan/async/issues/786), [#801](https://github.com/caolan/async/issues/801), [#802](https://github.com/caolan/async/issues/802), [#803](https://github.com/caolan/async/issues/803))
|
||||
- Various doc fixes ([#790](https://github.com/caolan/async/issues/790), [#794](https://github.com/caolan/async/issues/794))
|
||||
|
||||
Bug Fixes:
|
||||
- `cargo` now exposes the `payload` size, and `cargo.payload` can be changed on the fly after the `cargo` is created. (#740, #744, #783)
|
||||
- `cargo` now exposes the `payload` size, and `cargo.payload` can be changed on the fly after the `cargo` is created. ([#740](https://github.com/caolan/async/issues/740), [#744](https://github.com/caolan/async/issues/744), [#783](https://github.com/caolan/async/issues/783))
|
||||
|
||||
|
||||
# v1.2.1
|
||||
|
||||
Bug Fix:
|
||||
|
||||
- Small regression with synchronous iterator behavior in `eachSeries` with a 1-element array. Before 1.1.0, `eachSeries`'s callback was called on the same tick, which this patch restores. In 2.0.0, it will be called on the next tick. (#782)
|
||||
- Small regression with synchronous iterator behavior in `eachSeries` with a 1-element array. Before 1.1.0, `eachSeries`'s callback was called on the same tick, which this patch restores. In 2.0.0, it will be called on the next tick. ([#782](https://github.com/caolan/async/issues/782))
|
||||
|
||||
|
||||
# v1.2.0
|
||||
|
||||
New Features:
|
||||
|
||||
- Added `timesLimit` (#743)
|
||||
- `concurrency` can be changed after initialization in `queue` by setting `q.concurrency`. The new concurrency will be reflected the next time a task is processed. (#747, #772)
|
||||
- Added `timesLimit` ([#743](https://github.com/caolan/async/issues/743))
|
||||
- `concurrency` can be changed after initialization in `queue` by setting `q.concurrency`. The new concurrency will be reflected the next time a task is processed. ([#747](https://github.com/caolan/async/issues/747), [#772](https://github.com/caolan/async/issues/772))
|
||||
|
||||
Bug Fixes:
|
||||
|
||||
- Fixed a regression in `each` and family with empty arrays that have additional properties. (#775, #777)
|
||||
- Fixed a regression in `each` and family with empty arrays that have additional properties. ([#775](https://github.com/caolan/async/issues/775), [#777](https://github.com/caolan/async/issues/777))
|
||||
|
||||
|
||||
# v1.1.1
|
||||
|
||||
Bug Fix:
|
||||
|
||||
- Small regression with synchronous iterator behavior in `eachSeries` with a 1-element array. Before 1.1.0, `eachSeries`'s callback was called on the same tick, which this patch restores. In 2.0.0, it will be called on the next tick. (#782)
|
||||
- Small regression with synchronous iterator behavior in `eachSeries` with a 1-element array. Before 1.1.0, `eachSeries`'s callback was called on the same tick, which this patch restores. In 2.0.0, it will be called on the next tick. ([#782](https://github.com/caolan/async/issues/782))
|
||||
|
||||
|
||||
# v1.1.0
|
||||
|
@ -88,23 +314,23 @@ Bug Fix:
|
|||
New Features:
|
||||
|
||||
- `cargo` now supports all of the same methods and event callbacks as `queue`.
|
||||
- Added `ensureAsync` - A wrapper that ensures an async function calls its callback on a later tick. (#769)
|
||||
- Added `ensureAsync` - A wrapper that ensures an async function calls its callback on a later tick. ([#769](https://github.com/caolan/async/issues/769))
|
||||
- Optimized `map`, `eachOf`, and `waterfall` families of functions
|
||||
- Passing a `null` or `undefined` array to `map`, `each`, `parallel` and families will be treated as an empty array (#667).
|
||||
- The callback is now optional for the composed results of `compose` and `seq`. (#618)
|
||||
- Passing a `null` or `undefined` array to `map`, `each`, `parallel` and families will be treated as an empty array ([#667](https://github.com/caolan/async/issues/667)).
|
||||
- The callback is now optional for the composed results of `compose` and `seq`. ([#618](https://github.com/caolan/async/issues/618))
|
||||
- Reduced file size by 4kb, (minified version by 1kb)
|
||||
- Added code coverage through `nyc` and `coveralls` (#768)
|
||||
- Added code coverage through `nyc` and `coveralls` ([#768](https://github.com/caolan/async/issues/768))
|
||||
|
||||
Bug Fixes:
|
||||
|
||||
- `forever` will no longer stack overflow with a synchronous iterator (#622)
|
||||
- `eachLimit` and other limit functions will stop iterating once an error occurs (#754)
|
||||
- Always pass `null` in callbacks when there is no error (#439)
|
||||
- Ensure proper conditions when calling `drain()` after pushing an empty data set to a queue (#668)
|
||||
- `each` and family will properly handle an empty array (#578)
|
||||
- `eachSeries` and family will finish if the underlying array is modified during execution (#557)
|
||||
- `queue` will throw if a non-function is passed to `q.push()` (#593)
|
||||
- Doc fixes (#629, #766)
|
||||
- `forever` will no longer stack overflow with a synchronous iterator ([#622](https://github.com/caolan/async/issues/622))
|
||||
- `eachLimit` and other limit functions will stop iterating once an error occurs ([#754](https://github.com/caolan/async/issues/754))
|
||||
- Always pass `null` in callbacks when there is no error ([#439](https://github.com/caolan/async/issues/439))
|
||||
- Ensure proper conditions when calling `drain()` after pushing an empty data set to a queue ([#668](https://github.com/caolan/async/issues/668))
|
||||
- `each` and family will properly handle an empty array ([#578](https://github.com/caolan/async/issues/578))
|
||||
- `eachSeries` and family will finish if the underlying array is modified during execution ([#557](https://github.com/caolan/async/issues/557))
|
||||
- `queue` will throw if a non-function is passed to `q.push()` ([#593](https://github.com/caolan/async/issues/593))
|
||||
- Doc fixes ([#629](https://github.com/caolan/async/issues/629), [#766](https://github.com/caolan/async/issues/766))
|
||||
|
||||
|
||||
# v1.0.0
|
||||
|
@ -114,12 +340,12 @@ No known breaking changes, we are simply complying with semver from here on out.
|
|||
Changes:
|
||||
|
||||
- Start using a changelog!
|
||||
- Add `forEachOf` for iterating over Objects (or to iterate Arrays with indexes available) (#168 #704 #321)
|
||||
- Detect deadlocks in `auto` (#663)
|
||||
- Better support for require.js (#527)
|
||||
- Throw if queue created with concurrency `0` (#714)
|
||||
- Fix unneeded iteration in `queue.resume()` (#758)
|
||||
- Guard against timer mocking overriding `setImmediate` (#609 #611)
|
||||
- Miscellaneous doc fixes (#542 #596 #615 #628 #631 #690 #729)
|
||||
- Use single noop function internally (#546)
|
||||
- Add `forEachOf` for iterating over Objects (or to iterate Arrays with indexes available) ([#168](https://github.com/caolan/async/issues/168) [#704](https://github.com/caolan/async/issues/704) [#321](https://github.com/caolan/async/issues/321))
|
||||
- Detect deadlocks in `auto` ([#663](https://github.com/caolan/async/issues/663))
|
||||
- Better support for require.js ([#527](https://github.com/caolan/async/issues/527))
|
||||
- Throw if queue created with concurrency `0` ([#714](https://github.com/caolan/async/issues/714))
|
||||
- Fix unneeded iteration in `queue.resume()` ([#758](https://github.com/caolan/async/issues/758))
|
||||
- Guard against timer mocking overriding `setImmediate` ([#609](https://github.com/caolan/async/issues/609) [#611](https://github.com/caolan/async/issues/611))
|
||||
- Miscellaneous doc fixes ([#542](https://github.com/caolan/async/issues/542) [#596](https://github.com/caolan/async/issues/596) [#615](https://github.com/caolan/async/issues/615) [#628](https://github.com/caolan/async/issues/628) [#631](https://github.com/caolan/async/issues/631) [#690](https://github.com/caolan/async/issues/690) [#729](https://github.com/caolan/async/issues/729))
|
||||
- Use single noop function internally ([#546](https://github.com/caolan/async/issues/546))
|
||||
- Optimize internal `_each`, `_map` and `_keys` functions.
|
||||
|
|
2
node_modules/async/LICENSE
generated
vendored
|
@ -1,4 +1,4 @@
|
|||
Copyright (c) 2010-2014 Caolan McMahon
|
||||
Copyright (c) 2010-2018 Caolan McMahon
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|