January: 04
OSRS MDX Files
Section titled “OSRS MDX Files”-
10:56AM
Adding the custom prebuild script to create all 10K MDX files for the OSRS items. The plan is to migrate all the dynamic paths into the static paths for the OSRS flow. Then we pull the live data from our new API endpoints and render the chart/data from there! Later on, we can use the db workers to keep the data safely stored in the user’s browser storage.
-
02:40PM
HardCore
Got to the barrens today but its been rough, I am alone in the wasteland! I hope that the fellow guildmates reach the course of the level.
-
06:10PM
Abilities
Healing! A core of the gameplay is what we need to build now! The issue ticket that we are currently handling is 3651.
-
08:05PM
Twitch
While working through the AOE spells, I thought it be cool to work on the twitch stream!
-
11:00am - Going to aim at getting out of work earlier than before but I have some issues to prepare for, including being assigned to AAPL at $190. I will have to prepare around $38K to offset the 200 shares of AAPL from the two puts.
-
11:54am - Out of lunch and going to start doing the
GlobalStyles.tsxfor thejs-embed-passport. I am going to migrating out theKB.tsxinto its own JS/TS library, so that I can call it from anywhere. We can call the library,KhashVaultand have it serve as the cache for the nanostorage. -
12:18pm - Now I am looking into the bundler for the custom library that I am going to be using. For the vite bundler, we could use the nx generator via this command:
Terminal window pnpm nx g @nx/js:lib khashvault --directory packages/khashvault --bundler=viteIncluding the Nx 18 command for deriving the name / root.
For the vite test casing, it seems that we would have to configure the
vite-plugin-dts, this is a vite plugin that generates declaration files*.d.ts.To make sure that we have the plugin installed, we would run this command:
Terminal window pnpm i vite-plugin-dts -DAfter the plugin has been installed, it would be wise to reset the monorepo, with this command:
Terminal window ./kbve.sh -resetOkay to run the test casing for the library, we will use this command:
Terminal window pnpm exec nx run khashvault:testThe
khashvaultis the name of the library that we just created.Going to migrate the
storage.tsfrom theAstro-veto the newKhashVaultlibrary that we are building. -
7:31pm - The protobuf integration first requries having the right library installed. For the WSL/Ubuntu:
shell sudo apt-get install protobuf-compilerAfter the compiler is added and installed, we will check the version, with this command:Terminal window protoc --versionThis should return something along this line:
libprotoc 3.12.4This library will be used to help automate the protobuf types for javascript/typescript.
-
10:17pm - To automatically generate the protos, we are using the diesel_ext. The command that we are going to run is:
shell diesel_ext --proto > src/kbveproto.protoHowever upon the generation, there were three TODO errors that appear in the proto. An example of it would be: -TODO: unknown type Binary -
10:44pm - The current solution might be to just run sed after the generation to fix some of the generated files. It seems that I forgot to remove the
Identifiablefrom thederivebut need to account for the commas. So here the is the shell command that I will add into the kbve shell.Terminal window sed -i -e 's/#[derive(.*,\s*)Identifiable,\s*(.*)]/#[derive(\1\2)]/g' -e 's/#[derive(.*),\s*Identifiable\s*]/#[derive(\1)]/g' your_file.rsThis was giving some issues with the regex of the comma, so I decided to just remove the instance with
, Identifiable. I will come back to this issue later on.use crate::apikey::dsl::apikey;use crate::appwrite::dsl::appwrite;use crate::auth::dsl::auth;use crate::globals::dsl::globals;use crate::n8n::dsl::n8n;use crate::profile::dsl::profile;use crate::settings::dsl::settings;use crate::users::dsl::users;We will skip this part of the code block as well for now.
The next two phases of the protobuf generation would be the
into_protoand thefrom_proto. Both of these can be generated using-fand-iflags, like this:Terminal window diesel_ext -i -c class_name > src/into_proto.rsdiesel_ext -f -c class_name > src/from_proto.rsReplacing the
class_name.There are a couple errors that the CLI is throwing, which were similar to the ones with Binary types.
“Celebrate endings—for they precede new beginnings.” — Jonathan Lockwood Huie
- - No Tasks!