Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@casual-simulation/aux-vm-client

Package Overview
Dependencies
Maintainers
0
Versions
455
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@casual-simulation/aux-vm-client - npm Package Versions

1
46

3.3.0

Diff

Changelog

Source

V3.3.0

Date: 4/15/2024

:rocket: Features

  • Added a command line interface (CLI) for CasualOS.
    • It is available on NPM as casualos, and provides functionality to query the CasualOS backend API.
    • It currently provides the following operations:
      • login - Authenticates the cilent to a CasualOS backend.
      • query - Queries a CasualOS backend.
      • repl - A Read-eval-print-loop (REPL) that makes interacting with the CasualOS backend via JavaScript really easy.
  • Added the ability to create accounts that are not associated with an email or phone number.
    • These accounts are also issued a session key that cannot be revoked and does not expire.
    • They will mostly be used for one-time subscriptions and machine users.
    • This ability is only accessible by super users (see below).
  • Added several functions to make working with screen coordinates easier.
    • os.calculateViewportCoordinatesFromPosition(portal, position) - Calculates the viewport coordinates from the given 3D position in the portal.
      • portal is the portal that the request is from (one of grid, miniGrid, map, or miniMap).
      • position is the 3D position in the portal.
      • Viewport coordinates locate a specific point on the image that the camera produces. (X: 0, Y: 0) represents the center of the camera while (X: -1, Y: -1) represents the lower left corner and (X: 1, Y: 1) represents the upper right corner.
    • os.calculateViewportCoordinatesFromScreenCoordinates(portal, coordinates) - Calculates the viewport coordinates from the given 2D screen position.
      • portal is the portal that the request is for (one of grid, miniGrid, map, or miniMap).
      • position is the 2D position on the screen.
    • os.calculateScreenCoordinatesFromViewportCoordinates(portal, coordinates) - Calculates the screen coordinates from the given 2D viewport coordinates.
      • portal is the portal that the request is for (one of grid, miniGrid, map, or miniMap).
      • position is the 2D viewport coordinates that the screen coordinates should be found for.
  • Added eye tracking based transient-input support for Apple Vision Pro.
    • Look at bots you want to interact with and then pinch to start selection.
    • Dragging your hand will manipulate the input ray relative to where your eyes were looking until you let go of your pinch.
    • Feels like the natural input style that the rest of visionOS uses.
  • Added the superUser user role.
    • This is internal to CasualOS and is not related to roles that control access to record data.
    • There are currently only two roles: none, and superUser.
    • Currently, roles have to be assigned manually through the database. There is not API to grant a user the superUser role.
    • All users default to the none role.
    • When assigned the superUser role, a user has access to some operations that they would not normally have access to, including:
      • getUserInfo for all users
      • createAccount
      • listSessions for all users
      • listRecords for all users and studios
      • listStudios for all users
      • listStudioMembers for all studios
      • getSubscriptions for all users and studios
  • Added the ability to specify user login details in the URL.
    • When logged in, CasualOS stores a sessionKey and a connectionKey in the local storage of their web browser to keep them logged in.
    • When the sessionKey and connectionKey query params are specified in the URL, they will be used instead of the stored ones.
    • Additionally, they work for users who are not logged in.
    • This makes it possible to give someone a URL that grants them automatic access to an account.
  • Added the updateSubscription operation (POST /api/v2/subscriptions/update) to allow super users to grant a subscription to users or studios.
    • Currently, it can only be used to grant/revoke simple non-stripe subscriptions. If the user already has a stripe subscription, then the function will refuse to make changes.

:bug: Bug Fixes

  • Fixed an issue where ES2022 class fields would not support type annotations.
  • Fixed an issue where the miniGridPortal did not support using os.focusOn() with a position.
  • Fixed some performance issues when updating lots of bots across multiple frames.
kallyngowdyyeti
published 3.3.0-alpha.8667872942 •

kallyngowdyyeti
published 3.3.0-alpha.8557067421 •

kallyngowdyyeti
published 3.3.0-alpha.8556488817 •

kallyngowdyyeti
published 3.3.0-alpha.8545776335 •

kallyngowdyyeti
published 3.2.19 •

Changelog

Source

V3.2.19

Date: 4/1/2024

:boom: Breaking Changes

  • Forced all scripts to compile in Strict mode.
    • Strict mode restricts some functions and features of JavaScript to help catch common mistakes.
    • Some examples:
      • The implements, interface, let, package, private, protected, public, static, yield keywords are no longer allowed to be used as identifiers.
      • Assignments to non-writable globals (Infinity, undefined, etc.) are no longer allowed.
      • Assignments to non-writable properties now throws a TypeError.
      • It is no longer allowed to set properties on a primitive value.
      • Attempts to delete a non-configurable or otherwise undeletable property now throws a TypeError.
      • Duplicate parameter names are no longer allowed.
      • Numbers literals are no longer allowed to start with 0.
        • This is because sloppy mode allowed otcal literals to be any number starting with 0 and having every digit less than 8
        • If you weren't careful, it was easy to accidentally write an octal number. e.g.
        let num = 0123; // This does not equal 123, but is actually 83 in decimal
        
  • Enabled preact/compat for custom apps.
    • This change probably won't break anything, but I can't exactly be sure.
    • preact/compat improves Preact compatibility with React behavior and features.
    • See the Preact website for more information.

:rocket: Features

  • Added the ability to specify separate Redis servers for websocket connections, inst data, caches, and rate limits.
  • Added the os.appCompat API.
    • It is an object that contains APIs from preact/compat.
    • This includes, but is not limited to, Suspense, lazy(), createPortal(), forwardRef(), memo(), and PureComponent.
  • Added createRef() and createContext() to os.appHooks.
  • CasualOS will now send @onGridClick, @onGridUp, and @onGridDown shouts to all loaded insts.

:bug: Bug Fixes

  • Fixed an issue where attached debuggers would automatically get detached once a portal is opened or closed.
  • Fixed an issue where the registration flow would not always check display names properly.
  • Improved wording for some registration errors.
  • Fixed an issue where it was possible for a session to not be synced while the session itself believes that it is connected.
  • Fixed an issue where using JSX syntax would show random syntax errors in the multiline code editor.
  • Fixed an issue where it was possible for CasualOS to waste resources by loading the portals for an inst multiple times.
  • Fixed an issue where the miniGridPortal slider bar would interfere with the menuPortal.
kallyngowdyyeti
published 3.2.19-alpha.8483944672 •

kallyngowdyyeti
published 3.2.18 •

Changelog

Source

V3.2.18

Date: 3/20/2024

:rocket: Features

  • Added support for ES Module-style import and export statements.
    • ES Modules are a way to organize code into separate listeners.
    • With this update, CasualOS now supports using import and export statements in scripts.
    • By default, modules can be imported from 3 different places:
      • Scripts based on system tag. You can import exported functions and variables from any script based on the system tag of its bot. For example, import {abc} from "example.system.tag" can be used to import the abc variable or function from the bot with the example.system system and the tag tag.
      • URLs. The URLs can be imported. For example, import { sortBy } from 'https://esm.run/lodash-es';" imports the sortBy function from the lodash-es module provided by https://esm.run.
      • The casualos module. This module exports all of CasualOS's built-in functions. It is the only module that cannot be overriden with @onResolveModule. For example:
        import { os } from 'casualos';
        os.toast('Hello from my module!');
        
    • In addition to the default ways, you can provide your own custom module resolution logic by using @onResolveModule.
      • See the documentation for @onResolveModule for more information.
  • Added support for TypeScript syntax.
    • TypeScript is an extension of JavaScript that enables you to add type information to your code.
    • Combined with ES Modules, this means it is much easier to catch simple bugs because the editor will tell you when something doesn't match up.
    • For now, errors are only surfaced in each script, but in the future it will be possible to check for errors in any script.
    • There are a couple limitations:
      • Generally, any TypeScript feature that requires a significant amount of code generation (e.g. enums) are not supported.
      • Additionally, the let casted = <any>value; syntax for casting types is not supported since all scripts support JSX.
  • Added the 📄 prefix for "library" scripts.
    • Before, the only way to make a script was to use the @ prefix. Using the @ prefix makes what we call a "listener script" or "listener tag".
    • Now, you can use the 📄 prefix instead of @. Using 📄 makes what we call a "library script" or "library tag".
    • Library scripts work similarly to listener scripts, except with a couple key changes:
      • Library scripts cannot be shouted to. Instead, they have to be imported. This means you cannot use shout() or whisper() to communicate with a library script. Additionally, thisBot.script() does not work either.
      • Library scripts have to import all CasualOS functions. This means you cannot simply use os.toast(), you have to first import the casualos module. For example:
        import { os } from 'casualos';
        os.toast('Hello from my module!');
        
  • Updated CasualOS to support ECMAScript 14.
  • Updated Preact to v10.19.6
  • Added the ability to use .transferControlToOffscreen() and .getContext() functions on <canvas> HTML elements.
  • Added the ability to use .setPointerCapture() and .releasePointerCapture() functions on HTML elements.
  • Updated the privacy policies.

:bug: Bug Fixes

  • Fixed an issue where setting ?owner=player in the URL while not being logged in would cause a public inst to be loaded instead of prompting the user to login.
  • Fixed an issue where custom apps would not reappear after logging in with a code.
  • Fixed an issue where os.getCurrentInst() would return undefined if the inst is a static inst.
kallyngowdyyeti
published 3.2.18-alpha.8349491134 •

kallyngowdyyeti
published 3.2.18-alpha.8332065024 •

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc