mirror of
https://github.com/JonasunderscoreJones/api.jonasjones.dev.git
synced 2025-10-23 12:09:19 +02:00
Initial commit (by create-cloudflare CLI)
This commit is contained in:
commit
58a42872a0
1745 changed files with 741893 additions and 0 deletions
8
node_modules/@esbuild-plugins/node-modules-polyfill/esm/index.d.ts
generated
vendored
Normal file
8
node_modules/@esbuild-plugins/node-modules-polyfill/esm/index.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,8 @@
|
|||
import { Plugin } from 'esbuild';
|
||||
export interface NodePolyfillsOptions {
|
||||
name?: string;
|
||||
namespace?: string;
|
||||
}
|
||||
export declare function NodeModulesPolyfillPlugin(options?: NodePolyfillsOptions): Plugin;
|
||||
export default NodeModulesPolyfillPlugin;
|
||||
//# sourceMappingURL=index.d.ts.map
|
1
node_modules/@esbuild-plugins/node-modules-polyfill/esm/index.d.ts.map
generated
vendored
Normal file
1
node_modules/@esbuild-plugins/node-modules-polyfill/esm/index.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,MAAM,EAAE,MAAM,SAAS,CAAA;AAkB/C,MAAM,WAAW,oBAAoB;IACjC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,MAAM,CAAA;CACrB;AAED,wBAAgB,yBAAyB,CACrC,OAAO,GAAE,oBAAyB,GACnC,MAAM,CAwFR;AAmBD,eAAe,yBAAyB,CAAA"}
|
120
node_modules/@esbuild-plugins/node-modules-polyfill/esm/index.js
generated
vendored
Normal file
120
node_modules/@esbuild-plugins/node-modules-polyfill/esm/index.js
generated
vendored
Normal file
|
@ -0,0 +1,120 @@
|
|||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
import escapeStringRegexp from 'escape-string-regexp';
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import { builtinsPolyfills } from './polyfills';
|
||||
// import { NodeResolvePlugin } from '@esbuild-plugins/node-resolve'
|
||||
const NAME = 'node-modules-polyfills';
|
||||
const NAMESPACE = NAME;
|
||||
function removeEndingSlash(importee) {
|
||||
if (importee && importee.slice(-1) === '/') {
|
||||
importee = importee.slice(0, -1);
|
||||
}
|
||||
return importee;
|
||||
}
|
||||
export function NodeModulesPolyfillPlugin(options = {}) {
|
||||
const { namespace = NAMESPACE, name = NAME } = options;
|
||||
if (namespace.endsWith('commonjs')) {
|
||||
throw new Error(`namespace ${namespace} must not end with commonjs`);
|
||||
}
|
||||
// this namespace is needed to make ES modules expose their default export to require: require('assert') will give you import('assert').default
|
||||
const commonjsNamespace = namespace + '-commonjs';
|
||||
const polyfilledBuiltins = builtinsPolyfills();
|
||||
const polyfilledBuiltinsNames = [...polyfilledBuiltins.keys()];
|
||||
return {
|
||||
name,
|
||||
setup: function setup({ onLoad, onResolve, initialOptions }) {
|
||||
var _a;
|
||||
// polyfills contain global keyword, it must be defined
|
||||
if ((initialOptions === null || initialOptions === void 0 ? void 0 : initialOptions.define) && !((_a = initialOptions.define) === null || _a === void 0 ? void 0 : _a.global)) {
|
||||
initialOptions.define['global'] = 'globalThis';
|
||||
}
|
||||
else if (!(initialOptions === null || initialOptions === void 0 ? void 0 : initialOptions.define)) {
|
||||
initialOptions.define = { global: 'globalThis' };
|
||||
}
|
||||
// TODO these polyfill module cannot import anything, is that ok?
|
||||
function loader(args) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
try {
|
||||
const argsPath = args.path.replace(/^node:/, '');
|
||||
const isCommonjs = args.namespace.endsWith('commonjs');
|
||||
const resolved = polyfilledBuiltins.get(removeEndingSlash(argsPath));
|
||||
const contents = yield (yield fs.promises.readFile(resolved)).toString();
|
||||
let resolveDir = path.dirname(resolved);
|
||||
if (isCommonjs) {
|
||||
return {
|
||||
loader: 'js',
|
||||
contents: commonJsTemplate({
|
||||
importPath: argsPath,
|
||||
}),
|
||||
resolveDir,
|
||||
};
|
||||
}
|
||||
return {
|
||||
loader: 'js',
|
||||
contents,
|
||||
resolveDir,
|
||||
};
|
||||
}
|
||||
catch (e) {
|
||||
console.error('node-modules-polyfill', e);
|
||||
return {
|
||||
contents: `export {}`,
|
||||
loader: 'js',
|
||||
};
|
||||
}
|
||||
});
|
||||
}
|
||||
onLoad({ filter: /.*/, namespace }, loader);
|
||||
onLoad({ filter: /.*/, namespace: commonjsNamespace }, loader);
|
||||
const filter = new RegExp([
|
||||
...polyfilledBuiltinsNames,
|
||||
...polyfilledBuiltinsNames.map((n) => `node:${n}`),
|
||||
]
|
||||
.map(escapeStringRegexp)
|
||||
.join('|'));
|
||||
function resolver(args) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const argsPath = args.path.replace(/^node:/, '');
|
||||
const ignoreRequire = args.namespace === commonjsNamespace;
|
||||
if (!polyfilledBuiltins.has(argsPath)) {
|
||||
return;
|
||||
}
|
||||
const isCommonjs = !ignoreRequire && args.kind === 'require-call';
|
||||
return {
|
||||
namespace: isCommonjs ? commonjsNamespace : namespace,
|
||||
path: argsPath,
|
||||
};
|
||||
});
|
||||
}
|
||||
onResolve({ filter }, resolver);
|
||||
// onResolve({ filter: /.*/, namespace }, resolver)
|
||||
},
|
||||
};
|
||||
}
|
||||
function commonJsTemplate({ importPath }) {
|
||||
return `
|
||||
const polyfill = require('${importPath}')
|
||||
|
||||
if (polyfill && polyfill.default) {
|
||||
module.exports = polyfill.default
|
||||
for (let k in polyfill) {
|
||||
module.exports[k] = polyfill[k]
|
||||
}
|
||||
} else if (polyfill) {
|
||||
module.exports = polyfill
|
||||
}
|
||||
|
||||
|
||||
`;
|
||||
}
|
||||
export default NodeModulesPolyfillPlugin;
|
||||
//# sourceMappingURL=index.js.map
|
1
node_modules/@esbuild-plugins/node-modules-polyfill/esm/index.js.map
generated
vendored
Normal file
1
node_modules/@esbuild-plugins/node-modules-polyfill/esm/index.js.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,kBAAkB,MAAM,sBAAsB,CAAA;AACrD,OAAO,EAAE,MAAM,IAAI,CAAA;AACnB,OAAO,IAAI,MAAM,MAAM,CAAA;AAEvB,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAE/C,oEAAoE;AACpE,MAAM,IAAI,GAAG,wBAAwB,CAAA;AACrC,MAAM,SAAS,GAAG,IAAI,CAAA;AAEtB,SAAS,iBAAiB,CAAC,QAAQ;IAC/B,IAAI,QAAQ,IAAI,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE;QACxC,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;KACnC;IACD,OAAO,QAAQ,CAAA;AACnB,CAAC;AAOD,MAAM,UAAU,yBAAyB,CACrC,UAAgC,EAAE;IAElC,MAAM,EAAE,SAAS,GAAG,SAAS,EAAE,IAAI,GAAG,IAAI,EAAE,GAAG,OAAO,CAAA;IACtD,IAAI,SAAS,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE;QAChC,MAAM,IAAI,KAAK,CAAC,aAAa,SAAS,6BAA6B,CAAC,CAAA;KACvE;IACD,+IAA+I;IAC/I,MAAM,iBAAiB,GAAG,SAAS,GAAG,WAAW,CAAA;IACjD,MAAM,kBAAkB,GAAG,iBAAiB,EAAE,CAAA;IAC9C,MAAM,uB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C/B,mDAAmD;QACvD,CAAC;KACJ,CAAA;AACL,CAAC;AAED,SAAS,gBAAgB,CAAC,EAAE,UAAU,EAAE;IACpC,OAAO;4BACiB,UAAU;;;;;;;;;;;;CAYrC,CAAA;AACD,CAAC;AAED,eAAe,yBAAyB,CAAA"}
|
2
node_modules/@esbuild-plugins/node-modules-polyfill/esm/index.test.d.ts
generated
vendored
Normal file
2
node_modules/@esbuild-plugins/node-modules-polyfill/esm/index.test.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
export {};
|
||||
//# sourceMappingURL=index.test.d.ts.map
|
1
node_modules/@esbuild-plugins/node-modules-polyfill/esm/index.test.d.ts.map
generated
vendored
Normal file
1
node_modules/@esbuild-plugins/node-modules-polyfill/esm/index.test.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"index.test.d.ts","sourceRoot":"","sources":["../src/index.test.ts"],"names":[],"mappings":""}
|
178
node_modules/@esbuild-plugins/node-modules-polyfill/esm/index.test.js
generated
vendored
Normal file
178
node_modules/@esbuild-plugins/node-modules-polyfill/esm/index.test.js
generated
vendored
Normal file
|
@ -0,0 +1,178 @@
|
|||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
import { build } from 'esbuild';
|
||||
import { writeFiles } from 'test-support';
|
||||
import fs from 'fs';
|
||||
import NodeModulesPolyfillsPlugin from '.';
|
||||
import NodeGlobalsPolyfillsPlugin from '@esbuild-plugins/node-globals-polyfill';
|
||||
require('debug').enable(require('../package.json').name);
|
||||
test('works', () => __awaiter(void 0, void 0, void 0, function* () {
|
||||
const { unlink, paths: [ENTRY], } = yield writeFiles({
|
||||
'entry.ts': `import {x} from './utils'; console.log(x);`,
|
||||
'utils.ts': `import path from 'path'; import { Buffer } from 'buffer'; export const x = path.resolve(Buffer.from('x').toString());`,
|
||||
});
|
||||
// const outfile = randomOutputFile()
|
||||
const res = yield build({
|
||||
entryPoints: [ENTRY],
|
||||
write: false,
|
||||
format: 'esm',
|
||||
target: 'es2017',
|
||||
bundle: true,
|
||||
plugins: [NodeModulesPolyfillsPlugin()],
|
||||
});
|
||||
eval(res.outputFiles[0].text);
|
||||
// console.log(res.outputFiles[0].text)
|
||||
unlink();
|
||||
}));
|
||||
test('works with SafeBuffer and other package consumers', () => __awaiter(void 0, void 0, void 0, function* () {
|
||||
const { unlink, paths: [ENTRY], } = yield writeFiles({
|
||||
'entry.ts': `import {Buffer as SafeBuffer} from './safe-buffer'; console.log(SafeBuffer);`,
|
||||
'safe-buffer.ts': fs
|
||||
.readFileSync(require.resolve('safe-buffer'))
|
||||
.toString(),
|
||||
});
|
||||
// const outfile = randomOutputFile()
|
||||
const res = yield build({
|
||||
entryPoints: [ENTRY],
|
||||
write: false,
|
||||
format: 'esm',
|
||||
target: 'es2017',
|
||||
bundle: true,
|
||||
plugins: [NodeModulesPolyfillsPlugin()],
|
||||
});
|
||||
// console.log(
|
||||
// res.outputFiles[0].text
|
||||
// .split('\n')
|
||||
// .map((x, i) => i + ' ' + x)
|
||||
// .join('\n'),
|
||||
// )
|
||||
eval(res.outputFiles[0].text);
|
||||
unlink();
|
||||
}));
|
||||
test('events works', () => __awaiter(void 0, void 0, void 0, function* () {
|
||||
const { unlink, paths: [ENTRY], } = yield writeFiles({
|
||||
'entry.ts': `
|
||||
import EventEmitter from 'events';
|
||||
|
||||
class Test extends EventEmitter {
|
||||
constructor() { };
|
||||
}
|
||||
console.log(Test)
|
||||
`,
|
||||
});
|
||||
// const outfile = randomOutputFile()
|
||||
const res = yield build({
|
||||
entryPoints: [ENTRY],
|
||||
write: false,
|
||||
format: 'esm',
|
||||
target: 'es2017',
|
||||
bundle: true,
|
||||
plugins: [NodeModulesPolyfillsPlugin()],
|
||||
});
|
||||
// console.log(res.outputFiles[0].text)
|
||||
eval(res.outputFiles[0].text);
|
||||
unlink();
|
||||
}));
|
||||
test('require can use default export', () => __awaiter(void 0, void 0, void 0, function* () {
|
||||
const { unlink, paths: [ENTRY], } = yield writeFiles({
|
||||
'entry.ts': `
|
||||
const assert = require('assert')
|
||||
// console.log(assert)
|
||||
assert('ok')
|
||||
`,
|
||||
});
|
||||
// const outfile = randomOutputFile()
|
||||
const res = yield build({
|
||||
entryPoints: [ENTRY],
|
||||
write: false,
|
||||
format: 'esm',
|
||||
target: 'es2017',
|
||||
bundle: true,
|
||||
plugins: [NodeModulesPolyfillsPlugin()],
|
||||
});
|
||||
// console.log(res.outputFiles[0].text)
|
||||
eval(res.outputFiles[0].text);
|
||||
unlink();
|
||||
}));
|
||||
test.skip('crypto', () => __awaiter(void 0, void 0, void 0, function* () {
|
||||
const { unlink, paths: [ENTRY], } = yield writeFiles({
|
||||
'entry.ts': `import { randomBytes } from 'crypto'; console.log(randomBytes(20).toString('hex'))`,
|
||||
});
|
||||
// const outfile = randomOutputFile()
|
||||
const res = yield build({
|
||||
entryPoints: [ENTRY],
|
||||
write: false,
|
||||
format: 'esm',
|
||||
target: 'es2017',
|
||||
bundle: true,
|
||||
plugins: [NodeModulesPolyfillsPlugin()],
|
||||
});
|
||||
eval(res.outputFiles[0].text);
|
||||
// console.log(res.outputFiles[0].text)
|
||||
unlink();
|
||||
}));
|
||||
test.skip('fs', () => __awaiter(void 0, void 0, void 0, function* () {
|
||||
const { unlink, paths: [ENTRY], } = yield writeFiles({
|
||||
'entry.ts': `import { readFile } from 'fs'; console.log(readFile(''))`,
|
||||
});
|
||||
// const outfile = randomOutputFile()
|
||||
const res = yield build({
|
||||
entryPoints: [ENTRY],
|
||||
write: false,
|
||||
format: 'esm',
|
||||
target: 'es2017',
|
||||
bundle: true,
|
||||
plugins: [NodeModulesPolyfillsPlugin()],
|
||||
});
|
||||
eval(res.outputFiles[0].text);
|
||||
// console.log(res.outputFiles[0].text)
|
||||
unlink();
|
||||
}));
|
||||
test('does not include global keyword', () => __awaiter(void 0, void 0, void 0, function* () {
|
||||
const { unlink, paths: [ENTRY], } = yield writeFiles({
|
||||
'entry.ts': `import {x} from './utils'; console.log(x);`,
|
||||
'utils.ts': `import path from 'path'; import { Buffer } from 'buffer'; export const x = path.resolve(Buffer.from('x').toString());`,
|
||||
});
|
||||
// const outfile = randomOutputFile()
|
||||
const res = yield build({
|
||||
entryPoints: [ENTRY],
|
||||
write: false,
|
||||
format: 'esm',
|
||||
target: 'es2017',
|
||||
bundle: true,
|
||||
plugins: [NodeModulesPolyfillsPlugin()],
|
||||
});
|
||||
const text = res.outputFiles[0].text;
|
||||
eval(text);
|
||||
expect(text).not.toContain(/\bglobal\b/);
|
||||
// console.log(res.outputFiles[0].text)
|
||||
unlink();
|
||||
}));
|
||||
test('works with globals polyfills', () => __awaiter(void 0, void 0, void 0, function* () {
|
||||
const { unlink, paths: [ENTRY], } = yield writeFiles({
|
||||
'entry.ts': `import {x} from './utils'; console.log(x);`,
|
||||
'utils.ts': `import path from 'path'; import { Buffer } from 'buffer'; export const x = path.resolve(Buffer.from('x').toString());`,
|
||||
});
|
||||
// const outfile = randomOutputFile()
|
||||
const res = yield build({
|
||||
entryPoints: [ENTRY],
|
||||
write: false,
|
||||
format: 'esm',
|
||||
target: 'es2017',
|
||||
bundle: true,
|
||||
plugins: [NodeModulesPolyfillsPlugin(), NodeGlobalsPolyfillsPlugin()],
|
||||
});
|
||||
const text = res.outputFiles[0].text;
|
||||
eval(text);
|
||||
console.log(text);
|
||||
// console.log(res.outputFiles[0].text)
|
||||
unlink();
|
||||
}));
|
||||
//# sourceMappingURL=index.test.js.map
|
1
node_modules/@esbuild-plugins/node-modules-polyfill/esm/index.test.js.map
generated
vendored
Normal file
1
node_modules/@esbuild-plugins/node-modules-polyfill/esm/index.test.js.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"index.test.js","sourceRoot":"","sources":["../src/index.test.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,MAAM,IAAI,CAAA;AACnB,OAAO,0BAA0B,MAAM,GAAG,CAAA;AAC1C,OAAO,0BAA0B,MAAM,wCAAwC,CAAA;AAE/E,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,IAAI,CAAC,CAAA;AAExD,IAAI,CAAC,OAAO,EAAE,GAAS,EAAE;IACrB,MAAM,EACF,MAAM,EACN,KAAK,EAAE,CAAC,KAAK,CAAC,GACjB,GAAG,MAAM,UAAU,CAAC;QACjB,UAAU,EAAE,4CAA4C;QACxD,UAAU,EAAE,uHAAuH;KACtI,CAAC,CAAA;IACF,qCAAqC;IACrC,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC;QACpB,WAAW,EAAE,CAAC,KAAK,CAAC;QACpB,KAAK,EAAE,KAAK;QACZ,MAAM,EAAE,KAAK;QACb,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE,IAAI;QACZ,OAAO,EAAE,CAAC,0BAA0B,EAAE,CAAC;KAC1C,CAAC,CAAA;IACF,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAA;IAC7B,uCAAuC;IACvC,MAAM,EAAE,CAAA;AACZ,CAAC,CAAA,CAAC,CAAA;AAEF,IAAI,CAAC,mDAAmD,EAAE,GAAS,EAAE;IACjE,MAAM,EACF,MAAM,EACN,KAAK,EAAE,CAAC,KAAK,CAAC,GACjB,GAAG,MAAM,UAAU,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,GAAS,EAAE;IAC5C,MAAM,EACF,MAAM,EACN,KAAK,EAAE,CAAC,KAAK,CAAC,GACjB,GAAG,MAAM,UAAU,CAAC;QACjB,UAAU,EAAE,4CAA4C;QACxD,UAAU,EAAE,uHAAuH;KACtI,CAAC,CAAA;IACF,qCAAqC;IACrC,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC;QACpB,WAAW,EAAE,CAAC,KAAK,CAAC;QACpB,KAAK,EAAE,KAAK;QACZ,MAAM,EAAE,KAAK;QACb,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE,IAAI;QACZ,OAAO,EAAE,CAAC,0BAA0B,EAAE,EAAE,0BAA0B,EAAE,CAAC;KACxE,CAAC,CAAA;IACF,MAAM,IAAI,GAAG,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA;IACpC,IAAI,CAAC,IAAI,CAAC,CAAA;IACV,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;IACjB,uCAAuC;IACvC,MAAM,EAAE,CAAA;AACZ,CAAC,CAAA,CAAC,CAAA"}
|
2
node_modules/@esbuild-plugins/node-modules-polyfill/esm/polyfills.d.ts
generated
vendored
Normal file
2
node_modules/@esbuild-plugins/node-modules-polyfill/esm/polyfills.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
export declare function builtinsPolyfills(): Map<any, any>;
|
||||
//# sourceMappingURL=polyfills.d.ts.map
|
1
node_modules/@esbuild-plugins/node-modules-polyfill/esm/polyfills.d.ts.map
generated
vendored
Normal file
1
node_modules/@esbuild-plugins/node-modules-polyfill/esm/polyfills.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"polyfills.d.ts","sourceRoot":"","sources":["../src/polyfills.ts"],"names":[],"mappings":"AAQA,wBAAgB,iBAAiB,kBA8IhC"}
|
57
node_modules/@esbuild-plugins/node-modules-polyfill/esm/polyfills.js
generated
vendored
Normal file
57
node_modules/@esbuild-plugins/node-modules-polyfill/esm/polyfills.js
generated
vendored
Normal file
|
@ -0,0 +1,57 @@
|
|||
// Taken from https://github.com/ionic-team/rollup-plugin-node-polyfills/blob/master/src/modules.ts
|
||||
const EMPTY_PATH = require.resolve('rollup-plugin-node-polyfills/polyfills/empty.js');
|
||||
export function builtinsPolyfills() {
|
||||
const libs = new Map();
|
||||
libs.set('process', require.resolve('rollup-plugin-node-polyfills/polyfills/process-es6'));
|
||||
libs.set('buffer', require.resolve('rollup-plugin-node-polyfills/polyfills/buffer-es6'));
|
||||
libs.set('util', require.resolve('rollup-plugin-node-polyfills/polyfills/util'));
|
||||
libs.set('sys', libs.get('util'));
|
||||
libs.set('events', require.resolve('rollup-plugin-node-polyfills/polyfills/events'));
|
||||
libs.set('stream', require.resolve('rollup-plugin-node-polyfills/polyfills/stream'));
|
||||
libs.set('path', require.resolve('rollup-plugin-node-polyfills/polyfills/path'));
|
||||
libs.set('querystring', require.resolve('rollup-plugin-node-polyfills/polyfills/qs'));
|
||||
libs.set('punycode', require.resolve('rollup-plugin-node-polyfills/polyfills/punycode'));
|
||||
libs.set('url', require.resolve('rollup-plugin-node-polyfills/polyfills/url'));
|
||||
libs.set('string_decoder', require.resolve('rollup-plugin-node-polyfills/polyfills/string-decoder'));
|
||||
libs.set('http', require.resolve('rollup-plugin-node-polyfills/polyfills/http'));
|
||||
libs.set('https', require.resolve('rollup-plugin-node-polyfills/polyfills/http'));
|
||||
libs.set('os', require.resolve('rollup-plugin-node-polyfills/polyfills/os'));
|
||||
libs.set('assert', require.resolve('rollup-plugin-node-polyfills/polyfills/assert'));
|
||||
libs.set('constants', require.resolve('rollup-plugin-node-polyfills/polyfills/constants'));
|
||||
libs.set('_stream_duplex', require.resolve('rollup-plugin-node-polyfills/polyfills/readable-stream/duplex'));
|
||||
libs.set('_stream_passthrough', require.resolve('rollup-plugin-node-polyfills/polyfills/readable-stream/passthrough'));
|
||||
libs.set('_stream_readable', require.resolve('rollup-plugin-node-polyfills/polyfills/readable-stream/readable'));
|
||||
libs.set('_stream_writable', require.resolve('rollup-plugin-node-polyfills/polyfills/readable-stream/writable'));
|
||||
libs.set('_stream_transform', require.resolve('rollup-plugin-node-polyfills/polyfills/readable-stream/transform'));
|
||||
libs.set('timers', require.resolve('rollup-plugin-node-polyfills/polyfills/timers'));
|
||||
libs.set('console', require.resolve('rollup-plugin-node-polyfills/polyfills/console'));
|
||||
libs.set('vm', require.resolve('rollup-plugin-node-polyfills/polyfills/vm'));
|
||||
libs.set('zlib', require.resolve('rollup-plugin-node-polyfills/polyfills/zlib'));
|
||||
libs.set('tty', require.resolve('rollup-plugin-node-polyfills/polyfills/tty'));
|
||||
libs.set('domain', require.resolve('rollup-plugin-node-polyfills/polyfills/domain'));
|
||||
// not shimmed
|
||||
libs.set('dns', EMPTY_PATH);
|
||||
libs.set('dgram', EMPTY_PATH);
|
||||
libs.set('child_process', EMPTY_PATH);
|
||||
libs.set('cluster', EMPTY_PATH);
|
||||
libs.set('module', EMPTY_PATH);
|
||||
libs.set('net', EMPTY_PATH);
|
||||
libs.set('readline', EMPTY_PATH);
|
||||
libs.set('repl', EMPTY_PATH);
|
||||
libs.set('tls', EMPTY_PATH);
|
||||
libs.set('fs', EMPTY_PATH);
|
||||
libs.set('crypto', EMPTY_PATH);
|
||||
// libs.set(
|
||||
// 'fs',
|
||||
// require.resolve('rollup-plugin-node-polyfills/polyfills/browserify-fs'),
|
||||
// )
|
||||
// TODO enable crypto and fs https://github.com/ionic-team/rollup-plugin-node-polyfills/issues/20
|
||||
// libs.set(
|
||||
// 'crypto',
|
||||
// require.resolve(
|
||||
// 'rollup-plugin-node-polyfills/polyfills/crypto-browserify',
|
||||
// ),
|
||||
// )
|
||||
return libs;
|
||||
}
|
||||
//# sourceMappingURL=polyfills.js.map
|
1
node_modules/@esbuild-plugins/node-modules-polyfill/esm/polyfills.js.map
generated
vendored
Normal file
1
node_modules/@esbuild-plugins/node-modules-polyfill/esm/polyfills.js.map
generated
vendored
Normal file
|
@ -0,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