Socket
Socket
Sign inDemoInstall

@typegraph/sdk

Package Overview
Dependencies
0
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @typegraph/sdk

Declarative API development platform. Build serverless backends with zero-trust and less code, no matter where and how your (legacy) systems are.


Version published
Maintainers
1
Created

Changelog

Source

v0.3.3 - 2024-01-31

Bug Fixes

<details > <summary> (ci) Bug in `typegraph` release job (<a href="https://github.com/metatypedev/metatype/pull/545">#545</a>) </summary>
Motivation and context

jco output path is wrong.

Migration notes

N/A

Checklist

  • [ ] The change come with new or modified tests
  • [ ] Hard-to-understand functions have explanatory comments
  • [ ] End-user documentation is updated to reflect the change
</details> <details > <summary> (ci) Typo in release.yml (<a href="https://github.com/metatypedev/metatype/pull/548">#548</a>) </summary>

Fix small typo. Surprised act didn't catch this, it must evaluate expressions lazily.

</details> <details > <summary> (ci) Force/skip push to registries on manual release (<a href="https://github.com/metatypedev/metatype/pull/549">#549</a>) </summary>

What it says on the tin can. Also fixes a typo in the vscode-extension job.

Motivation and context

Manual re-release breaks otherwise as seen here.

</details> <details > <summary> (ci) Typos in release.yml (<a href="https://github.com/metatypedev/metatype/pull/550">#550</a>) </summary>

Oof, I can't believe I missed these. The publish steps are hard to test locally with act so ig they require extra scrutiny.

Motivation and context

Bug on manual dispatch of releasae wflow.

</details> <details > <summary> (ci) Mismatch in location of `$AZURE_DEVOPS_TOKEN` (<a href="https://github.com/metatypedev/metatype/pull/551">#551</a>) </summary>

Another minor issue with the release workflow.

Motivation and context

Failure in release run here.

</details> <details > <summary> (ci,release) Hack for broken arm64 builds, bump deno to 1.40.1, bump to 0.3.3 (<a href="https://github.com/metatypedev/metatype/pull/565">#565</a>) </summary>

This provides a temporary fix for the broken build on arm64. The issue's related to wasm-opt builds not being availaible for install by ghjk/cargo-binstall. This PR uses cargo install directly instead when in the dockerfile.

It also:

  • bumps metatype version to 0.3.3 to ready the next release
  • bumps the deno version to 1.40.1 (which comes with some changes)
Motivation and context

Failure in CI run..

Migration notes

No changes required

Checklist

  • [x] The change come with new or modified tests
  • [ ] Hard-to-understand functions have explanatory comments
  • [ ] End-user documentation is updated to reflect the change
</details> <details open> <summary> (cli) Bad conditionals in loader detection (<a href="https://github.com/metatypedev/metatype/pull/559">#559</a>) - BREAKING: bad conditionals in loader detection (<a href="https://github.com/metatypedev/metatype/pull/559">#559</a>) </summary>
  • Fix bug in js typegraph loader detection.
  • FIx bug where the cwd for loader was overridden in loader_cmd despite being set in get_loader_cmd.
  • Update to latest ghjk
  • Refresh setup task in whiz.yaml
Motivation and context

The old conditionals were faulty.

Migration notes
  • node and bun loaders are now run with the cwd set to the directory of the typegraph as opposed to the metatype.yml file. This should resolve settings to the nearest package.json despite location.

Checklist

  • [ ] The change come with new or modified tests
  • [ ] Hard-to-understand functions have explanatory comments
  • [ ] End-user documentation is updated to reflect the change
</details> <details > <summary> (cli, typegate) Explicitly import DenoRuntime.import modules from path (<a href="https://github.com/metatypedev/metatype/pull/564">#564</a>) </summary>

When using the dynamic import function, if you provide it a raw path like /foo/bar/baz and deno detects the current module's loaded from a remote host, it'll convert it to a http url. Reasonable behavior but it turned out to be the cause of #560.

This pr fixes this issue along with:

  • Puts contents of main.ts in a try/catch block for better error logging.
  • Fixes minor permission bugs with the bundled runtime.
Motivation and context

#560

Migration notes

No changes required

Checklist

  • [ ] The change come with new or modified tests
  • [ ] Hard-to-understand functions have explanatory comments
  • [ ] End-user documentation is updated to reflect the change
</details> <details > <summary> (oauth2-profiler) Fix OAuth2 profiler params (<a href="https://github.com/metatypedev/metatype/pull/562">#562</a>) </summary>

Pass the appropriate request URL and headers to the profiler resolver.

Motivation and context

It used the provider url instead of the (typegate) request URL, causing internal queries to fail.

Migration notes

N/A

Checklist

  • [x] The change come with new or modified tests
  • [x] Hard-to-understand functions have explanatory comments
  • [x] End-user documentation is updated to reflect the change
</details> <details > <summary> (template/node) Update sdk version to 0.3.2 + add `deno.static` (<a href="https://github.com/metatypedev/metatype/pull/558">#558</a>) </summary>
Motivation and context

Sync template examples with latest 0.3.2. Added missing deno.static and func.rate(...) on node.

Migration notes

N/A

Checklist

  • [x] The change come with new or modified tests
  • [ ] Hard-to-understand functions have explanatory comments
  • [ ] End-user documentation is updated to reflect the change
</details> <details > <summary> (vscode-extension) Fix publisher name and version (<a href="https://github.com/metatypedev/metatype/pull/553">#553</a>) </summary> <!-- Pull requests are squash merged using: - their title as the commit message - their description as the commit body Having a good title and description is important for the users to get readable changelog and understand when they need to update his code and how. -->
  • Change the publisher name to metatypedev to match the account name on Azure Devops.
  • Add dev-tools projects to dev/lock.yml for automatic versioning.
Motivation and context

Failure to publish the extension.

  • Non-matching version.
Migration notes

Blank

Checklist

  • [ ] ~~The change come with new or modified tests~~ (N/A)
  • [ ] ~~Hard-to-understand functions have explanatory comments~~ (N/A)
  • [ ] ~~End-user documentation is updated to reflect the change~~ (N/A)
</details>

Documentation

<details > <summary> (website) Move typegraphs in separate folder + add ts version (<a href="https://github.com/metatypedev/metatype/pull/552">#552</a>) </summary>
Motivation and context

Better organization + typescript examples.

Migration notes

N/A

Checklist

  • [x] The change come with new or modified tests
  • [x] Hard-to-understand functions have explanatory comments
  • [x] End-user documentation is updated to reflect the change
</details>

Features

<details > <summary> (node) Node fontend missing features (<a href="https://github.com/metatypedev/metatype/pull/557">#557</a>) </summary>
Motivation and context

Easier translation from python to typescript typegraph.

Migration notes

N/A

Checklist

  • [ ] The change come with new or modified tests
  • [ ] Hard-to-understand functions have explanatory comments
  • [ ] End-user documentation is updated to reflect the change
</details> <details > <summary> (prisma) Add support multi-field ids and id on struct (<a href="https://github.com/metatypedev/metatype/pull/556">#556</a>) </summary>

Adds support for more advanced id fields and unique constraints:

  • Multi-field id
  • Id on struct (foreign key)
  • Multi-field unique constraints
  • Unique constraint on struct (foreign key)
Motivation and context

Support these kind of construct:

user = t.struct(
  {
    "authProvider": t.string().from_context("provider"),
    "profileId": t.string().from_context("profile.id"),
    # ...
  },
  config={"id": ["authProvider", "profileId"]},
).rename("User")

project = t.struct(
  {
    "id": t.uuid(as_id=True, config=["auto"]),
    "owner": g.ref("Account"),
    "name": t.string(min=3, pattern="^[A-Za-z_-]$"),
  },
  config={"unique": [["owner", "name"]]}
).rename("Project")
Migration notes

No migration needed.

Checklist

  • [x] The change come with new or modified tests
  • [x] Hard-to-understand functions have explanatory comments
  • [ ] End-user documentation is updated to reflect the change
</details> <details > <summary> (typegate) Oauth2 token validation endpoint (<a href="https://github.com/metatypedev/metatype/pull/567">#567</a>) </summary>

Create an oauth2 token validation endpoint: /:tgName/auth/validate.

Motivation and context
<!-- Explain WHY the was made or link an issue number -->
Migration notes
<!-- Explain HOW users should update their code when required -->

Checklist

  • [x] The change come with new or modified tests
  • [x] Hard-to-understand functions have explanatory comments
  • [ ] End-user documentation is updated to reflect the change
</details> <details > <summary> (typegate-rt) Extend typegate runtime (<a href="https://github.com/metatypedev/metatype/pull/561">#561</a>) </summary>

Extend the typegate runtime with the following queries:

  • findListQueries: find all the queries that returns a list of t.struct.
Motivation and context

Console.

Migration notes

N/A

Checklist

  • [ ] The change come with new or modified tests
  • [ ] Hard-to-understand functions have explanatory comments
  • [ ] End-user documentation is updated to reflect the change
</details> <details > <summary> (vscode-ext) Logo, README, display name, description (<a href="https://github.com/metatypedev/metatype/pull/554">#554</a>) </summary>
  • Added a better display name and description
  • Added logo and README
</details> <details > <summary> Flattened context (<a href="https://github.com/metatypedev/metatype/pull/555">#555</a>) </summary>

Flatten profile fields in the context.

So instead of

{
    provider: 'github',
    accessToken: 'xxxxxxxxxxxxxxxxxxxxxxxxxx',
    refreshToken: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
    refreshAt: 1704717676,
    profile: { id: '43663718' },
    exp: 1707280877,
    iat: 1704688876
}

we would have:

{
    provider: 'github',
    accessToken: 'xxxxxxxxxxxxxxxxxxxxxxxxxx',
    refreshToken: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
    refreshAt: 1704717676,
    'profile.id': '43663718',
    exp: 1707280877,
    iat: 1704688876
 }
Motivation and context

It was impossible to get the nested id into a from_context injection. Now we can inject .from_context("profile.id").

Migration notes
<!-- Explain HOW users should update their code when required -->

Checklist

  • [ ] The change come with new or modified tests
  • [x] Hard-to-understand functions have explanatory comments
  • [ ] End-user documentation is updated to reflect the change
</details>

Refactor

<details > <summary> (ci) `workflow_dispatch` for release wflow (<a href="https://github.com/metatypedev/metatype/pull/546">#546</a>) </summary>
  • Manual trigger for release wflow
  • Adds missing ghjk step for vscode-extension release job
Motivation and context

Provides recovery path for when things break.

Migration notes

Doesn't affect end users.

Checklist

  • [ ] The change come with new or modified tests
  • [ ] Hard-to-understand functions have explanatory comments
  • [ ] End-user documentation is updated to reflect the change
</details>

FAQs

Last updated on 31 Jan 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc