ChilliSniff
ChilliSniff
DDeno
Created by ChilliSniff on 11/28/2023 in #help
module not updating anymore
i have a module which is not updating anymore it seems to be stuck on version 1.5 i already have pushed several new tags and i also can see successfull deliveries on my github page but the module just does not update , i really dont want to spam the module space but if this problem gets not solved quickly i am forced to create another module which has the exact same content plus the new one... https://deno.land/x/handyhelpers@1.5
9 replies
DDeno
Created by ChilliSniff on 11/4/2023 in #help
cannot set property on fetch response
in the browser this works
let o = await fetch('https://deno.com');
o.asdf = 2
console.log(o.asdf)//2
let o = await fetch('https://deno.com');
o.asdf = 2
console.log(o.asdf)//2
but not in deno js
3 replies
DDeno
Created by ChilliSniff on 8/31/2023 in #help
third party module not updating / releasing
Dear all, I have just added a github repo , https://github.com/jonasfrey/o_file__wav, added a webhook (https://api.deno.land/webhook/gh/o_file__wav) selected content-type : application/json, selected only 'Branch or tag creation' . then i have added a tag with git tag 0.1 and git push --tags but the module does not appear on https://deno.land/x/o_file__wav@0.1 what could be the problem ?
7 replies
DDeno
Created by ChilliSniff on 2/28/2023 in #help
deno in Dockerfile
i have successfully installed deno with theese commands:
# install denojs
RUN curl -fsSL https://deno.land/x/install/install.sh | sh
ENV DENO_INSTALL /root/.deno
ENV PATH="$DENO_INSTALL/bin:$PATH"
# install denojs
RUN curl -fsSL https://deno.land/x/install/install.sh | sh
ENV DENO_INSTALL /root/.deno
ENV PATH="$DENO_INSTALL/bin:$PATH"
in my Dockerfile, but when i try to run a script:
// export { Buffer } from "https://deno.land/std/node/buffer.ts";
import { Buffer } from "https://deno.land/std/node/buffer.ts";
console.log(Buffer)
// export { Buffer } from "https://deno.land/std/node/buffer.ts";
import { Buffer } from "https://deno.land/std/node/buffer.ts";
console.log(Buffer)
inside the virtual docker container i get the following message
Warning Implicitly using latest version (0.178.0) for https://deno.land/std/node/buffer.ts
error: Module not found "https://deno.land/std/node/buffer.ts".
Warning Implicitly using latest version (0.178.0) for https://deno.land/std/node/buffer.ts
error: Module not found "https://deno.land/std/node/buffer.ts".
what could be going on ?
9 replies
DDeno
Created by ChilliSniff on 1/1/2023 in #help
deno.run not working as expected
so when i run mysql --defaults-extra-file=./tmpcnf_from_f_execute_query.cnf -e "DROP DATABASE test_database" i get the correct expected error message ERROR 1008 (HY000) at line 1: Can't drop database 'test_database'; database doesn't exist but when i try to run this with deno
const p=Deno.run({
cmd: `mysql --defaults-extra-file=./tmpcnf_from_f_execute_query.cnf -e "DROP DATABASE test_database"`.split(" "),
stdout: 'piped',
stderr: 'piped',
stdin: 'null'
});
await p.status();
console.log(new TextDecoder().decode(await p.output()));
console.log(new TextDecoder().decode(await p.stderrOutput()));
const p=Deno.run({
cmd: `mysql --defaults-extra-file=./tmpcnf_from_f_execute_query.cnf -e "DROP DATABASE test_database"`.split(" "),
stdout: 'piped',
stderr: 'piped',
stdin: 'null'
});
await p.status();
console.log(new TextDecoder().decode(await p.output()));
console.log(new TextDecoder().decode(await p.stderrOutput()));
i just get the mysql help output mysql Ver 8.0.31-0ubuntu2 for Linux on x86_64 ((Ubuntu)) Copyright (c) 2000, 2022, Oracle and/or its affiliates. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Usage: mysql [OPTIONS] [database] -?, --help Display this help and exit. -I, --help Synonym for -? --auto-rehash Enable automatic rehashing. One doesn't need to use 'rehash' to get table and field completion, but startup and reconnecting may take a longer time. Disable with... ...more lines does anyone know why?
4 replies
DDeno
Created by ChilliSniff on 10/24/2022 in #help
http serve and serveTls using async iterator cannot serve multiple domains
async f_serveTls() {
var o_self = this
// check if ssl cert exists
await o_self.f_check_if_ssl_exists();

await this.f_init();

// var self = this;
var o_server_https = Deno.listenTls(
{
certFile: o_self.o_config.o_ssl.s_path_certificate_file,
keyFile: o_self.o_config.o_ssl.s_path_key_file,
port: o_self.o_config.o_encrypted.n_port,
hostname: o_self.o_config.o_encrypted.s_host,
}
);

o_self.f_handle_connections_and_serve_http2(o_server_https,o_http_request_handler_default);

}

async f_serve() {
var o_self = this;
await this.f_init();
var o_server = Deno.listen(
{
port: parseInt(o_self.o_config.o_not_encrypted.n_port),
hostname: o_self.o_config.o_not_encrypted.s_host,
}
)
o_self.f_handle_connections_and_serve_http2(o_server,o_http_request_handler_default);
// o_self.f_handle_connections_and_serve_http(o_server,o_http_request_handler_file_explorer);
}

async f_handle_connections_and_serve_http2(o_server,o_http_request_handler){
for await (const o_connection of o_server) {
(async () => {
const o_http_connection = Deno.serveHttp(o_connection);
for await (const o_request_event of o_http_connection) {
return await o_http_request_handler.f_http_request_handler(
o_http_connection,
o_request_event,
o_self
)
// ... handle requestEvent ...
}
})();
}
}
async f_serveTls() {
var o_self = this
// check if ssl cert exists
await o_self.f_check_if_ssl_exists();

await this.f_init();

// var self = this;
var o_server_https = Deno.listenTls(
{
certFile: o_self.o_config.o_ssl.s_path_certificate_file,
keyFile: o_self.o_config.o_ssl.s_path_key_file,
port: o_self.o_config.o_encrypted.n_port,
hostname: o_self.o_config.o_encrypted.s_host,
}
);

o_self.f_handle_connections_and_serve_http2(o_server_https,o_http_request_handler_default);

}

async f_serve() {
var o_self = this;
await this.f_init();
var o_server = Deno.listen(
{
port: parseInt(o_self.o_config.o_not_encrypted.n_port),
hostname: o_self.o_config.o_not_encrypted.s_host,
}
)
o_self.f_handle_connections_and_serve_http2(o_server,o_http_request_handler_default);
// o_self.f_handle_connections_and_serve_http(o_server,o_http_request_handler_file_explorer);
}

async f_handle_connections_and_serve_http2(o_server,o_http_request_handler){
for await (const o_connection of o_server) {
(async () => {
const o_http_connection = Deno.serveHttp(o_connection);
for await (const o_request_event of o_http_connection) {
return await o_http_request_handler.f_http_request_handler(
o_http_connection,
o_request_event,
o_self
)
// ... handle requestEvent ...
}
})();
}
}
I have two local domains to test the server, when i visit localhost:8080 or localhost:8443 all works , but then when i want to vist my other domain i get a timeout... anybody knows how to serve https and http for multiple domains ?
1 replies
DDeno
Created by ChilliSniff on 10/1/2022 in #help
Deno.serveTls with self signed certificate
i try to create a webserver but i cannot use self signed certificates, how can i solve this ?
deno run -A --unsafely-ignore-certificate-errors webserver.js
DANGER: TLS certificate validation is disabled for all hostnames
HTTP webserver running. Access it at: http://localhost:8080/
HTTPS webserver running. Access it at: https://localhost:8443/
TLS alert received: AlertMessagePayload {
level: Fatal,
description: CertificateUnknown,
}
error: Uncaught (in promise) Http: error writing a body to connection: received fatal alert: CertificateUnknown
for await (const o_request_event of o_http_connection) {
deno run -A --unsafely-ignore-certificate-errors webserver.js
DANGER: TLS certificate validation is disabled for all hostnames
HTTP webserver running. Access it at: http://localhost:8080/
HTTPS webserver running. Access it at: https://localhost:8443/
TLS alert received: AlertMessagePayload {
level: Fatal,
description: CertificateUnknown,
}
error: Uncaught (in promise) Http: error writing a body to connection: received fatal alert: CertificateUnknown
for await (const o_request_event of o_http_connection) {
10 replies
DDeno
Created by ChilliSniff on 10/1/2022 in #help
distinguis `netERR_CONNECTION_TIMED_OUT` from `netERR_CERT_AUTHORITY_INVALID`
i get net::ERR_CERT_AUTHORITY_INVALID because i use self signed certs on the domain localhost now i want to check if the net::ERR_CERT_AUTHORITY_INVALID occurs, and if so the user should receive a message, but how can i distingish form other network errors like if the server is down fetch would throw a net::ERR_CONNECTION_REFUSED when i catch the fetch error , all i get is:
e instanceof TypeError: true
client.module.js:199 e.message: Failed to fetch
client.module.js:200 e.name: TypeError
client.module.js:201 e.fileName: undefined
client.module.js:202 e.lineNumber: undefined
client.module.js:203 e.columnNumber: undefined
client.module.js:204 e.stack: TypeError: Failed to fetch
at yn.mounted (https://localhost:8443/client.module.js:195:36)
at Rt (https://cdn.jsdelivr.net/npm/vue@2.6.12/dist/vue.esm.browser.min.js:6:10992)
at qe (https://cdn.jsdelivr.net/npm/vue@2.6.12/dist/vue.esm.browser.min.js:6:24968)
at https://cdn.jsdelivr.net/npm/vue@2.6.12/dist/vue.esm.browser.min.js:6:67609
at yn.$mount (https://cdn.jsdelivr.net/npm/vue@2.6.12/dist/vue.esm.browser.min.js:6:67628)
at yn.$mount (https://cdn.jsdelivr.net/npm/vue@2.6.12/dist/vue.esm.browser.min.js:6:92832)
at e._init (https://cdn.jsdelivr.net/npm/vue@2.6.12/dist/vue.esm.browser.min.js:6:32472)
at new yn (https://cdn.jsdelivr.net/npm/vue@2.6.12/dist/vue.esm.browser.min.js:6:29795)
at https://localhost:8443/client.module.js:156:20
client.module.js:206
e instanceof TypeError: true
client.module.js:199 e.message: Failed to fetch
client.module.js:200 e.name: TypeError
client.module.js:201 e.fileName: undefined
client.module.js:202 e.lineNumber: undefined
client.module.js:203 e.columnNumber: undefined
client.module.js:204 e.stack: TypeError: Failed to fetch
at yn.mounted (https://localhost:8443/client.module.js:195:36)
at Rt (https://cdn.jsdelivr.net/npm/vue@2.6.12/dist/vue.esm.browser.min.js:6:10992)
at qe (https://cdn.jsdelivr.net/npm/vue@2.6.12/dist/vue.esm.browser.min.js:6:24968)
at https://cdn.jsdelivr.net/npm/vue@2.6.12/dist/vue.esm.browser.min.js:6:67609
at yn.$mount (https://cdn.jsdelivr.net/npm/vue@2.6.12/dist/vue.esm.browser.min.js:6:67628)
at yn.$mount (https://cdn.jsdelivr.net/npm/vue@2.6.12/dist/vue.esm.browser.min.js:6:92832)
at e._init (https://cdn.jsdelivr.net/npm/vue@2.6.12/dist/vue.esm.browser.min.js:6:32472)
at new yn (https://cdn.jsdelivr.net/npm/vue@2.6.12/dist/vue.esm.browser.min.js:6:29795)
at https://localhost:8443/client.module.js:156:20
client.module.js:206
1 replies
DDeno
Created by ChilliSniff on 9/24/2022 in #help
does not provide an export named... module import
does anybody know whats going on, when i reload my page only sometimes i get this message :
The requested module './mymod.module.js' does not provide an export named 'mymod'
The requested module './mymod.module.js' does not provide an export named 'mymod'
when i import like this
import {mymod} from "./mymod.module.js"
import {mymod} from "./mymod.module.js"
but when i import like this
var mymod = (await import("./mymod.module.js")).mymod
var mymod = (await import("./mymod.module.js")).mymod
then it is working what is going on ?
18 replies
DDeno
Created by ChilliSniff on 9/24/2022 in #help
Request.body.getReader() into Uint8Array typed array
is it possible to convert a readableStream into a Uint8Array ?
11 replies
DDeno
Created by ChilliSniff on 9/21/2022 in #help
import a locel module from a webmodule
I have a module that i inport into my local scope and that module should also import a module from my local scope and not from its url , is this possible ?
11 replies