Commit bc585f2a authored by Akari Labs's avatar Akari Labs

line endings i guess

parent f3c05910
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
*.lcov
# nyc test coverage
.nyc_output
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# TypeScript v1 declaration files
typings/
# TypeScript cache
*.tsbuildinfo
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
.env.test
# parcel-bundler cache (https://parceljs.org/)
.cache
# next.js build output
.next
# nuxt.js build output
.nuxt
# vuepress build output
.vuepress/dist
# Serverless directories
.serverless/
# FuseBox cache
.fusebox/
# DynamoDB Local files
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
*.lcov
# nyc test coverage
.nyc_output
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# TypeScript v1 declaration files
typings/
# TypeScript cache
*.tsbuildinfo
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
.env.test
# parcel-bundler cache (https://parceljs.org/)
.cache
# next.js build output
.next
# nuxt.js build output
.nuxt
# vuepress build output
.vuepress/dist
# Serverless directories
.serverless/
# FuseBox cache
.fusebox/
# DynamoDB Local files
.dynamodb/
\ No newline at end of file
MIT License
Copyright (c) 2019 astra and caela akari (nocebo and lp0)
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.
MIT License
Copyright (c) 2019 astra and caela akari (nocebo and lp0)
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.
# cascade-webpack
# cascade-webpack
rip apart webpack modules with ease
\ No newline at end of file
function createSymbols(arr) {
const r = {};
arr.forEach(k => r[k] = Symbol(k));
return r;
}
const style = createSymbols(['func', 'array', 'unknown']);
module.exports = {
hookWebpack(pushHook, mod) {
var _webpack, _push;
var _style = style.unknown;
var _insmod_acc = 9000;
// insert a module into webpack
function insmod(mod) {
if (mod === undefined) return;
switch (_style) {
case style.func:
_webpack([++_insmod_acc], [mod], [0]);
break;
case style.array:
_push.apply(_webpack, [[[++_insmod_acc], { cascade: mod }, [['cascade']]]]);
break;
default:
console.warn('cant insmod, unrecognized webpack type');
break;
}
}
Object.defineProperty(window, 'webpackJsonp', {
get: () => _webpack,
set(webpack) {
switch (typeof webpack) {
case 'function':
if (webpack.length === 3 || webpack.length === 2) {
// probably just a relatively normal webpack config
// we naively assume that if there are 2 parameters, it will still be ok
// pleromafe's webpack doesnt take a third parameter, but luckily javascript doesnt give a fuck
_style = style.func;
_webpack = (x, mod, main) => webpack(x, pushHook(mod), main);
}
else {
// god fucking damn it
// okay i have no fucking idea what to do with you
console.warn('cant hook webpack: unrecognized prototype for webpackJsonp');
_webpack = webpack;
return;
}
// hacky but i dont really know how else to go about this
// pleromafe's webpack fails if we insmod before returning from webpackJsonp setter
setTimeout(() => insmod(mod), 10);
break;
case 'object':
if (webpack instanceof Array && webpack.push) {
_style = style.array;
if (webpack.push.hooked || webpack.push === Array.prototype.push) {
_webpack = webpack;
return;
}
_push = webpack.push;
webpack.push = (x, mod, main) => {
if (!mod) {
mod = x[1];
main = x[2];
x = x[0];
}
return _push.apply(webpack, [[x, pushHook(mod), main]]);
}
webpack.push.hooked = true;
_webpack = webpack;
insmod(mod);
}
else return console.warn('cant hook webpack: webpackJsonp is an object, but isnt an array');
break;
default:
console.warn('cant hook webpack: i have no idea what webpackJsonp even is');
_webpack = webpack;
return;
}
}
});
}
function createSymbols(arr) {
const r = {};
arr.forEach(k => r[k] = Symbol(k));
return r;
}
const style = createSymbols(['func', 'array', 'unknown']);
module.exports = {
hookWebpack(pushHook, mod) {
var _webpack, _push;
var _style = style.unknown;
var _insmod_acc = 9000;
// insert a module into webpack
function insmod(mod) {
if (mod === undefined) return;
switch (_style) {
case style.func:
_webpack([++_insmod_acc], [mod], [0]);
break;
case style.array:
_push.apply(_webpack, [[[++_insmod_acc], { cascade: mod }, [['cascade']]]]);
break;
default:
console.warn('cant insmod, unrecognized webpack type');
break;
}
}
Object.defineProperty(window, 'webpackJsonp', {
get: () => _webpack,
set(webpack) {
switch (typeof webpack) {
case 'function':
if (webpack.length === 3 || webpack.length === 2) {
// probably just a relatively normal webpack config
// we naively assume that if there are 2 parameters, it will still be ok
// pleromafe's webpack doesnt take a third parameter, but luckily javascript doesnt give a fuck
_style = style.func;
_webpack = (x, mod, main) => webpack(x, pushHook(mod), main);
}
else {
// god fucking damn it
// okay i have no fucking idea what to do with you
console.warn('cant hook webpack: unrecognized prototype for webpackJsonp');
_webpack = webpack;
return;
}
// hacky but i dont really know how else to go about this
// pleromafe's webpack fails if we insmod before returning from webpackJsonp setter
setTimeout(() => insmod(mod), 10);
break;
case 'object':
if (webpack instanceof Array && webpack.push) {
_style = style.array;
if (webpack.push.hooked || webpack.push === Array.prototype.push) {
_webpack = webpack;
return;
}
_push = webpack.push;
webpack.push = (x, mod, main) => {
if (!mod) {
mod = x[1];
main = x[2];
x = x[0];
}
return _push.apply(webpack, [[x, pushHook(mod), main]]);
}
webpack.push.hooked = true;
_webpack = webpack;
insmod(mod);
}
else return console.warn('cant hook webpack: webpackJsonp is an object, but isnt an array');
break;
default:
console.warn('cant hook webpack: i have no idea what webpackJsonp even is');
_webpack = webpack;
return;
}
}
});
}
};
\ No newline at end of file
This diff is collapsed.
{
"name": "nanopack_cascade",
"version": "0.0.0",
"description": "rip apart webpack modules with ease",
"main": "package.nanopack.json",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "https://git.agiri.ninja/lp0/cascade-webpack.git"
},
"author": "nocebo and lp0",
"license": "MIT"
}
{
"name": "nanopack_cascade",
"version": "0.0.0",
"description": "rip apart webpack modules with ease",
"main": "package.nanopack.json",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "https://git.agiri.ninja/lp0/cascade-webpack.git"
},
"author": "nocebo and lp0",
"license": "MIT"
}
{
"friendly_name": "cascade",
"modules": {
"webpack.abstraction": {
"filename": "modules/webpack.abstraction.js"
},
"webpack": {
"filename": "modules/webpack.js",
"doCallbacks": true
}
}
{
"friendly_name": "cascade",
"modules": {
"webpack.abstraction": {
"filename": "modules/webpack.abstraction.js"
},
"webpack": {
"filename": "modules/webpack.js",
"doCallbacks": true
}
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment