profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/adelsz/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.

adelsz/pgtyped 1657

pgTyped - Typesafe SQL in TypeScript

adelsz/inquirer-fuzzy-path 56

Fuzzy file/directory search and select prompt for Inquirer.js

adelsz/graphql-deno 37

GraphQL-JS ported to Deno

adelsz/mnotify 4

Minimal D-Bus notification daemon

adelsz/automerge 0

A JSON-like data structure (a CRDT) that can be modified concurrently by different users, and merged again automatically.

adelsz/aws-cdk 0

The AWS Cloud Development Kit is a framework for defining cloud infrastructure in code

adelsz/csv-edit 0

Simple CSV editor in ClojureScript/React

adelsz/deno_website2 0

deno.land website

adelsz/graphql-code-generator 0

GraphQL code generator with flexible support for custom plugins and templates

adelsz/hydrophone 0

This API sends notifications to users for things like forgotten passwords, initial signup, and invitations.

push eventadelsz/hydrophone

Adel

commit sha ed49db1ba955ea4363be93cb31517458c6774b5a

test 2

view details

push time in 9 hours

push eventadelsz/hydrophone

Adel

commit sha 3e70584832135ba80b44098c8a1cdf2706c8be0d

test

view details

push time in 10 hours

fork adelsz/hydrophone

This API sends notifications to users for things like forgotten passwords, initial signup, and invitations.

fork in 16 hours

release adelsz/pgtyped

v0.12.0

released time in 2 days

created tagadelsz/pgtyped

tagv0.12.0

pgTyped - Typesafe SQL in TypeScript

created time in 2 days

push eventadelsz/pgtyped

Adel

commit sha 35664c01d6e7961c16bc5e2786943187c620a837

Update lockfiles and fix minor TS quirk

view details

Adel

commit sha e8bd84256ec0ec6d37ba89c7fca21f9a3360d763

v0.12.0

view details

push time in 2 days

push eventadelsz/pgtyped

Adel

commit sha 7b1224f2468414e0990b01f8d1648fee06070c8d

Document non-nullability modifiers

view details

push time in 2 days

issue closedadelsz/pgtyped

What's the best way to handle create or update?

Finding that I'm writing a lot of logic around updating records based on the existence that might be considered a first or create or upsert. Update the first record but if that record doesn't exist I want to create it and wondering how others are handling this. Something like a PostgreSQL upsert? https://www.postgresqltutorial.com/postgresql-upsert/ Seems like there's nothing preventing me from using upsert with pgtyped but is it a pattern that should be propagated everywhere? Thank you.

Example:

I want to update a user, I try to naively do an update first. await updateUser(userAttributes) if the gid on userAttributes doesn't exist, then it fails and I need to do await insertUser(userAttributes)

I could try to pull the record user and if it doesn't exist create it. Most of the time when I want to update the user record, the record should be there.

Thank you.

Example queries:

/*
  @name updateUser
*/
UPDATE users
SET
    "lastName" = :lastName,
WHERE "gid" = :gid
RETURNING "gid";
/*
  @name insertUser
*/
INSERT INTO users( "lastName")
VALUES ( :name)
RETURNING *;

closed time in 2 days

lauraeci

issue commentadelsz/pgtyped

What's the best way to handle create or update?

pgTyped isn't opinionated on this. We try to support all valid SQL.

lauraeci

comment created time in 2 days

issue commentadelsz/pgtyped

What's the best way to handle create or update?

Seems like there's nothing preventing me from using upsert with pgtyped but is it a pattern that should be propagated everywhere?

Not sure if I understand the question. pgTyped does support upserts.

lauraeci

comment created time in 2 days

issue closedadelsz/pgtyped

esModuleInterop must be true, this isn't ideal as it conflicts with projects built with it being false

Running version 0.11, I get this issue when adding pgTyped to a project that does not have "esModuleInterop":true, enabled.

care-bot (feat/schema) λ npm run build 

> care-bot@1.0.0 build /home/owg1/Projects/care-bot
> rm -rf output && node_modules/.bin/tsc --sourceMap && cp -R schemas/node_grpc_js output/schemas && cp -R app/editor/db/migrations/ output/app/editor/db/ && cp app/editor/db/seed.sql output/app/editor/db/

node_modules/@pgtyped/query/lib/actions.d.ts:3:8 - error TS1192: Module '"tls"' has no default export.

3 import tls from 'tls';
         ~~~

node_modules/@pgtyped/query/lib/loader/typescript/index.d.ts:1:8 - error TS1259: Module '"/home/owg1/Projects/care-bot/node_modules/typescript/lib/typescript"' can only be default-imported using the 'esModuleInterop' flag

1 import ts from 'typescript';
         ~~

  node_modules/typescript/lib/typescript.d.ts:7222:1
    7222 export = ts;
         ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.


Found 2 errors.

Is this intentional, or can I make a quickfix PR?

closed time in 2 days

bag-man

PR merged adelsz/pgtyped

chore(deps): update dependency ws to 7.4.6 [security]

WhiteSource Renovate

This PR contains the following updates:

Package Change
ws 7.4.5 -> 7.4.6

GitHub Vulnerability Alerts

CVE-2021-32640

Impact

A specially crafted value of the Sec-Websocket-Protocol header can be used to significantly slow down a ws server.

Proof of concept

for (const length of [1000, 2000, 4000, 8000, 16000, 32000]) {
  const value = 'b' + ' '.repeat(length) + 'x';
  const start = process.hrtime.bigint();

  value.trim().split(/ *, */);

  const end = process.hrtime.bigint();

  console.log('length = %d, time = %f ns', length, end - start);
}

Patches

The vulnerability was fixed in ws@7.4.6 (https://github.com/websockets/ws/commit/00c425ec77993773d823f018f64a5c44e17023ff) and backported to ws@6.2.2 (https://github.com/websockets/ws/commit/78c676d2a1acefbc05292e9f7ea0a9457704bf1b) and ws@5.2.3 (https://github.com/websockets/ws/commit/76d47c1479002022a3e4357b3c9f0e23a68d4cd2).

Workarounds

In vulnerable versions of ws, the issue can be mitigated by reducing the maximum allowed length of the request headers using the --max-http-header-size=size and/or the maxHeaderSize options.

Credits

The vulnerability was responsibly disclosed along with a fix in private by Robert McLaughlin from University of California, Santa Barbara.


Configuration

📅 Schedule: "" (UTC).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box.

This PR has been generated by WhiteSource Renovate. View repository job log here.

+3 -3

1 comment

1 changed file

renovate[bot]

pr closed time in 2 days

push eventadelsz/pgtyped

renovate[bot]

commit sha dbefbd08625e246e97ecf7d79e2860c67eb85a58

chore(deps): update dependency ws to 7.4.6 [security] (#341) Co-authored-by: Renovate Bot <bot@renovateapp.com>

view details

push time in 2 days

push eventadelsz/pgtyped

Bradley Ayers

commit sha 382bdb821e6b2c7368b663603b3443f5276120d9

Remove unused code (#266) * chore: remove unused code This enables tslint no-unused-variable options to check for unused parameters, imports, and variables. Ideally we'd use TypeScript's native `noUnusedLocals` and `noUnusedParameters`, but unfortunately antlr4ts generates code that violates this. There's an open issue about this https://github.com/tunnelvisionlabs/antlr4ts/issues/412 so if it's eventually fixed we can swap to `noUnusedLocals`. * Keep wire helper types * Revert generated files Co-authored-by: Adel <adel.m.salah@gmail.com>

view details

push time in 2 days

PR merged adelsz/pgtyped

Reviewers
Remove unused code

Removes some dead code that isn't used (in the spirit of trying to improve on-boarding to the code base).

+17 -72

4 comments

16 changed files

bradleyayers

pr closed time in 2 days

startedizelnakri/memoria

started time in 3 days

push eventbradleyayers/pgtyped

Adel

commit sha 6234e10da8e374845cfc55fdcd5f63525999609c

Revert generated files

view details

push time in 3 days

push eventbradleyayers/pgtyped

Adel

commit sha 3ce055e54f561b1cf29e12b7b28288976a664064

Keep wire helper types

view details

push time in 3 days

push eventadelsz/pgtyped

renovate[bot]

commit sha c215fa9e59a704e44da09dfc27c461d59ecf5f34

chore(deps): update dependency url-parse to 1.5.2 [security] (#340) Co-authored-by: Renovate Bot <bot@renovateapp.com>

view details

push time in 3 days

PR merged adelsz/pgtyped

chore(deps): update dependency url-parse to 1.5.2 [security]

WhiteSource Renovate

This PR contains the following updates:

Package Change
url-parse 1.5.1 -> 1.5.2

GitHub Vulnerability Alerts

CVE-2021-3664

Overview

Affected versions of npm url-parse are vulnerable to URL Redirection to Untrusted Site.

Impact

Depending on library usage and attacker intent, impacts may include allow/block list bypasses, SSRF attacks, open redirects, or other undesired behavior.


Configuration

📅 Schedule: "" (UTC).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box.

This PR has been generated by WhiteSource Renovate. View repository job log here.

+3 -3

1 comment

1 changed file

renovate[bot]

pr closed time in 3 days

push eventadelsz/pgtyped

renovate[bot]

commit sha 5e206375309394f646ba1642ac9e9a5b0e070e2f

chore(deps): update dependency prismjs to 1.24.0 [security] (#338) Co-authored-by: Renovate Bot <bot@renovateapp.com>

view details

push time in 3 days

PR merged adelsz/pgtyped

chore(deps): update dependency prismjs to 1.24.0 [security]

WhiteSource Renovate

This PR contains the following updates:

Package Change
prismjs 1.23.0 -> 1.24.0

GitHub Vulnerability Alerts

CVE-2021-32723

Some languages before 1.24.0 are vulnerable to Regular Expression Denial of Service (ReDoS).

Impact

When Prism is used to highlight untrusted (user-given) text, an attacker can craft a string that will take a very very long time to highlight. Do not use the following languages to highlight untrusted text.

  • ASCIIDoc
  • ERB

Other languages are not affected and can be used to highlight untrusted text.

Patches

This problem has been fixed in Prism v1.24.

References

  • PrismJS/prism#​2774
  • PrismJS/prism#​2688

Configuration

📅 Schedule: "" (UTC).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box.

This PR has been generated by WhiteSource Renovate. View repository job log here.

+3 -44

1 comment

1 changed file

renovate[bot]

pr closed time in 3 days

push eventadelsz/pgtyped

dependabot[bot]

commit sha 6a2974ce15331c8c4bf375776f7c9cd5aba04dd7

Bump tar from 6.1.0 to 6.1.11 in /docs-new (#332) Bumps [tar](https://github.com/npm/node-tar) from 6.1.0 to 6.1.11. - [Release notes](https://github.com/npm/node-tar/releases) - [Changelog](https://github.com/npm/node-tar/blob/main/CHANGELOG.md) - [Commits](https://github.com/npm/node-tar/compare/v6.1.0...v6.1.11) --- updated-dependencies: - dependency-name: tar dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

view details

push time in 3 days

PR merged adelsz/pgtyped

Bump tar from 6.1.0 to 6.1.11 in /docs-new dependencies

Bumps tar from 6.1.0 to 6.1.11. <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/npm/node-tar/commit/e573aeea19d4d650908b7f6bf0a1ad8dce9f1736"><code>e573aee</code></a> 6.1.11</li> <li><a href="https://github.com/npm/node-tar/commit/edb8e9a3fa5869cfb935479a262f6f61b0a2ec57"><code>edb8e9a</code></a> fix: perf regression on hot string munging path</li> <li><a href="https://github.com/npm/node-tar/commit/a9d9b05fc974425089922bf66e8e7751ea8bfbbc"><code>a9d9b05</code></a> chore(test): Avoid spurious failures packing node_modules/.cache</li> <li><a href="https://github.com/npm/node-tar/commit/24b8bdadf37118182496ecf81fa7a872196fb38b"><code>24b8bda</code></a> fix(test): use posix path for testing path reservations</li> <li><a href="https://github.com/npm/node-tar/commit/e5a223c6b293f1cb2ebb2dd97668f787e8983ca4"><code>e5a223c</code></a> fix(test): make unpack test pass on case-sensitive fs</li> <li><a href="https://github.com/npm/node-tar/commit/188baddc1d0e6ef5140c7a788f03fc2a6c3df2ea"><code>188badd</code></a> 6.1.10</li> <li><a href="https://github.com/npm/node-tar/commit/23312ce7db8a12c78d0fba96d7664a01619266a3"><code>23312ce</code></a> drop dirCache for symlink on all platforms</li> <li><a href="https://github.com/npm/node-tar/commit/4f1f4a21fca64f3089da0e83ceea775c66b55052"><code>4f1f4a2</code></a> 6.1.9</li> <li><a href="https://github.com/npm/node-tar/commit/875a37e3ec031186fc6599f6807341f56c584598"><code>875a37e</code></a> fix: prevent path escape using drive-relative paths</li> <li><a href="https://github.com/npm/node-tar/commit/b6162c7fafe797f856564ef37f4b82747f051455"><code>b6162c7</code></a> fix: reserve paths properly for unicode, windows</li> <li>Additional commits viewable in <a href="https://github.com/npm/node-tar/compare/v6.1.0...v6.1.11">compare view</a></li> </ul> </details> <br />

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the Security Alerts page.

</details>

+3 -3

1 comment

1 changed file

dependabot[bot]

pr closed time in 3 days

push eventadelsz/pgtyped

renovate[bot]

commit sha 638d1826faaa40fa4bc3f2c5071da55ac0aa70cf

chore(deps): update dependency path-parse to 1.0.7 [security] (#337) Co-authored-by: Renovate Bot <bot@renovateapp.com>

view details

push time in 3 days

PR merged adelsz/pgtyped

chore(deps): update dependency path-parse to 1.0.7 [security]

WhiteSource Renovate

This PR contains the following updates:

Package Change
path-parse 1.0.6 -> 1.0.7

GitHub Vulnerability Alerts

CVE-2021-23343

Affected versions of npm package path-parse are vulnerable to Regular Expression Denial of Service (ReDoS) via splitDeviceRe, splitTailRe, and splitPathRe regular expressions. ReDoS exhibits polynomial worst-case time complexity.


Configuration

📅 Schedule: "" (UTC).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box.

This PR has been generated by WhiteSource Renovate. View repository job log here.

+3 -3

1 comment

1 changed file

renovate[bot]

pr closed time in 3 days

push eventadelsz/pgtyped

renovate[bot]

commit sha 7a733398091b2a89d8e76f64b9ccdd75fc7cc14e

chore(deps): update dependency dns-packet to 1.3.2 [security] (#336) Co-authored-by: Renovate Bot <bot@renovateapp.com>

view details

push time in 3 days

PR merged adelsz/pgtyped

chore(deps): update dependency dns-packet to 1.3.2 [security]

WhiteSource Renovate

This PR contains the following updates:

Package Change
dns-packet 1.3.1 -> 1.3.2

GitHub Vulnerability Alerts

CVE-2021-23386

This affects the package dns-packet before versions 1.3.2 and 5.2.2. It creates buffers with allocUnsafe and does not always fill them before forming network packets. This can expose internal application memory over unencrypted network when querying crafted invalid domain names.


Configuration

📅 Schedule: "" (UTC).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box.

This PR has been generated by WhiteSource Renovate. View repository job log here.

+3 -3

1 comment

1 changed file

renovate[bot]

pr closed time in 3 days

push eventadelsz/pgtyped

renovate[bot]

commit sha 63db02fba374911f4db24c121f20031fa2a5fa6f

chore(deps): update dependency axios to 0.21.2 [security] (#335) Co-authored-by: Renovate Bot <bot@renovateapp.com>

view details

push time in 3 days