Proyecto audio control. inicado con panel y control.

This commit is contained in:
2025-11-11 02:26:04 -05:00
parent 7ea49a026e
commit 6895960127
4248 changed files with 493435 additions and 0 deletions

View File

@@ -0,0 +1 @@
export {};

View File

@@ -0,0 +1,71 @@
// Copyright 2019 Google, LLC
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
import express from 'express';
import { execFile } from 'child_process';
import * as multiparty from 'multiparty';
import cors from 'cors';
import { promisify } from 'util';
const port = 7172;
const exec = promisify(execFile);
async function listen(app, port) {
return new Promise((resolve, reject) => {
const server = app.listen(port, (err) => {
if (err) {
reject(err);
}
resolve(server);
});
});
}
// Starts a web server that browser tests will use, then runs actual browser
// tests.
async function main() {
const app = express();
app.use(cors());
app.post('/path', (req, res) => {
if (req.header('origin')) {
res.set('Access-Control-Allow-Origin', req.header('origin'));
}
const form = new multiparty.Form({ autoFields: true });
form.parse(req, (err, fields) => {
if (err) {
res.status(500).send({ message: err.message });
}
else {
res.status(200).send(fields.null);
}
});
});
app.get('/path', (req, res) => {
if (req.header('origin')) {
res.set('Access-Control-Allow-Origin', req.header('origin'));
}
res.send('response');
});
app.get('/querystring', (req, res) => {
if (req.header('origin')) {
res.set('Access-Control-Allow-Origin', req.header('origin'));
}
const query = req.query.query;
res.send(query || '');
});
const server = await listen(app, port);
console.log(`[http server] I'm listening on port ${port}! Starting karma.`);
await exec('karma', ['start']);
server.close();
console.log(`[http server] Karma has finished! I'm no longer listening on port ${port}!`);
}
main().catch(err => {
console.log('Error:', err);
});
//# sourceMappingURL=browser-test-runner.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"browser-test-runner.js","sourceRoot":"","sources":["../../../browser-test/browser-test-run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C,CAAC;IAEH,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IACvC,OAAO,CAAC,GAAG,CAAC,uCAAuC,IAAI,mBAAmB,CAAC,CAAC;IAC5E,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAC/B,MAAM,CAAC,KAAK,EAAE,CAAC;IACf,OAAO,CAAC,GAAG,CACT,qEAAqE,IAAI,GAAG,CAC7E,CAAC;AACJ,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;IACjB,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;AAC7B,CAAC,CAAC,CAAC"}

View File

@@ -0,0 +1 @@
export {};

View File

@@ -0,0 +1,76 @@
// Copyright 2019 Google, LLC
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
import assert from 'assert';
import { describe, it } from 'mocha';
import { request } from '../src/index';
const port = 7172; // should match the port defined in `webserver.ts`
describe('💻 browser tests', () => {
it('should just work from browser', async () => {
const result = await request({ url: `http://localhost:${port}/path` });
assert.strictEqual(result.status, 200);
assert.strictEqual(result.data, 'response');
});
it('should pass querystring parameters from browser', async () => {
const result = await request({
url: `http://localhost:${port}/querystring`,
params: { query: 'value' },
});
assert.strictEqual(result.status, 200);
assert.strictEqual(result.data, 'value');
});
it('should allow passing browser fetch explicitly', async () => {
const result = await request({
url: `http://localhost:${port}/path`,
fetchImplementation: window.fetch,
});
assert.strictEqual(result.status, 200);
});
it('should support multipart post from the browser', async () => {
const headers = new Headers();
const multipart = [
{
'Content-Type': 'application/json',
body: JSON.stringify({ hello: 'world' }),
},
{
'Content-Type': 'text/plain',
body: 'hello world!',
},
];
const boundary = globalThis?.crypto.randomUUID() || (await import('crypto')).randomUUID();
const finale = `--${boundary}--`;
headers.set('Content-Type', `multipart/related; boundary=${boundary}`);
let content = '';
for (const part of multipart) {
const preamble = `--${boundary}\r\nContent-Type: ${part['Content-Type']}\r\n\r\n`;
// rStream.push(preamble);
content += preamble;
if (typeof part.body === 'string') {
content += part.body;
content += '\r\n';
}
}
content += finale;
const result = await request({
headers,
data: content,
method: 'POST',
url: `http://localhost:${port}/path`,
});
assert.strictEqual(result.status, 200);
const parts = result.data;
assert.strictEqual(parts[0], '{"hello":"world"}');
assert.strictEqual(parts[1], 'hello world!');
});
});
//# sourceMappingURL=test.browser.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"test.browser.js","sourceRoot":"","sources":["../../../browser-test/test.browser.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAC,QAAQ,EAAE,EAAE,EAAC,MAAM,OAAO,CAAC;AACnC,OAAO,EAAC,OAAO,EAAC,MAAM,cAAc,CAAC;AACrC,MAAM,IAAI,GAAG,IAAI,CAAC,CAAC,kDAAkD;AAErE,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;IAChC,EAAE,CAAC,+BAA+B,EAAE,KAAK,IAAI,EAAE;QAC7C,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,EAAC,GAAG,EAAE,oBAAoB,IAAI,OAAO,EAAC,CAAC,CAAC;QACrE,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QACvC,MAAM,CAAC,WAAW,CAAC,MA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