Uploading files to Userbase
10x Resume candidates can use just ↗︎ commands as described below to upload their portfolio to the Userbase database they created before rendering their content.
Uploading rendering content
Directory34476472.Brilliant e.g. the git worktree for the enquiry
DirectoryJob
DirectoryPortfolio
Directorybuild/
Directory10x json, html and zip files for upload
- _items.json
Directoryanalysis.1
- index.html
- analysis.1.zip
- …
The 10x Resume .justfile provides an upload command to
to upload the 10x Resume content to Userbase.
Note that only a subset of the Job/Portfolio/build/10x files are uploaded:
- the
_items.jsonindex with portfolio metadata - a
index.htmlfile for each Job/Portfolio/Src/10x source page - a
.zipfile for pages with content in Job/Portfolio/Src/10x-files
Steps
-
To upload the 10x Resume portfolio for the enquiry, run the following command from the git worktree (e.g. ~/10xresume/34476472.Brilliant)
Terminal window just uploadSample output
% just uploaddotenvx run -- ./Apps/Cli/dist/10x upload[dotenvx@1.19.2] injecting env (19) from .envAccess init { appId: 'ed070b06-62c8-4da8-a162-e42f756371a4' } +0msAccess init session {} +2msAccess init user undefined +0msAccess init username undefined +0msAccess [Access 'signIn',Access { username: '34476472candidate', password: 'xxxxxxxxxxxxxxxxxxxx' }Access ] +0msAccess [ 'openDatabase', { databaseName: 'enquiry' } ] +1sAccess [Access 'insertOrUpdateItem',Access {Access databaseName: 'enquiry',Access item: {Access kind: 'analysis',Access icon: 'icons.1/icon.svg',Access dark: 'icons.1/dark.svg',Access name: 'Analysis Sample',Access desc: 'An analysis sample.',Access size: 'tbd'Access },Access itemId: 'analysis.1'Access }Access ] +144msadded analysis.1...added profile.1Access [ 'signOut' ] +127msuploadedrm -rf __userbase_localStorage
Verifying uploaded content
Directory34476472.Brilliant e.g. the git worktree for the enquiry
Directory34476472.download e.g. directory with downloaded files
- _items.json
Directoryanalysis.1
- index.html
- analysis.1.zip
- …
The 10x Resume .justfile provides download and compare
commands to download the 10x Resume content from Userbase
into a local directory and compare the downloaded files with the ones
uploaded from the Job/Portfolio/build/10x directory.
The download command creates a directory with a prefix matching
the prefix of the worktree and ending in .download.
For example, if the worktree prefix is 34476472 the download
directory will be named 34476472.download.
Steps
-
To download the 10x Resume portfolio data uploaded to Userbase, run the following command from the git worktree (e.g. ~/10xresume/34476472.Brilliant)
Terminal window just downloadSample output
% just downloaddotenvx run -- ./Apps/Cli/dist/10x download[dotenvx@1.19.2] injecting env (19) from .envAccess init { appId: 'ed070b06-62c8-4da8-a162-e42f756371a4' } +0msAccess init session {} +2msAccess init user undefined +0msAccess init username undefined +0msAccess [Access 'signIn',Access { username: '34476472candidate', password: 'xxxxxxxxxxxxxxxxxxxx' }Access ] +0msAccess [ 'openDatabase', { databaseName: 'enquiry' } ] +1sAccess [ 'downloadFile', 'a8d26d4e-fa16-4d7f-801d-da19b9e433e9' ] +338mswrote 34476472.download/analysis.1/index.html...wrote 34476472.download/writing.1.zipAccess [ 'downloadFile', '16efc6ad-f814-4a63-9785-c4d4dd0dfbc7' ] +116mswrote 34476472.download/writing.2/index.htmlAccess [ 'signOut' ] +121msdownloaded 66rm -rf __userbase_localStorage -
Run the following command to compare the downloaded files with those uploaded from Job/Portfolio/build/10x using the diff command.
Terminal window just compareSample output
% just compare./Scripts/compare.shskipping ./_items.json34476472.download files match Job/Portfolio/build/10x filesNote the script reports that the
_items.jsonfile was skipped because items downloaded from Userbase contain addition metadata not present in the file uploaded from Job/Portfolio/build/10x making the results not comparable with diff.