Currently, if I follow the steps for cloning a near account's widgets
npx bos-workspace clone {accountId}
It will download the widgets to /widget and create a bos.config.json.
Then I can:
cd {accountId}
npx bos-workspace dev
Similarly, you can init an empty bos-workspace via:
npx bos-workspace init
Which will print,
➜ expr: npx bos-workspace init
✔ What NEAR AccountId deploys your project? … easypoll-v0.ndc-widgets.near
Project initialization complete.
To get started, cd into the easypoll-v0.ndc-widgets.near directory, then run:
yarn install
yarn dev
Be the BOS!
Then I will have a project initialized with package.json, scripts, etc.
Ask
I want the option to combine these two commands -- if I provide a "NEAR AccountId deploys your project", and this account exists and has widgets, then I want to be prompted with
"Widgets already exist at this NEAR Account, would you like to import them?"
and if they say yes, then it should clone the widgets in with the correct account in bos.config.json.
Acceptance criteria
[ ] bos-workspace init easypoll-v0.ndc-widgets.near is valid and will skip the first question if it ends in .near (otherwise it will just treat as a [dest] name)
[ ] init does not ask to import if provided account does not have widgets
[ ] init does ask to import if provided account has widgets
[ ] Saying yes to import will load all widgets from provided near account
[ ] Saying no will not import widgets from account and will init as usual
[ ] ^ tests of the same name to verify the above, in "tests/init.ts"
What talent are you looking for?
Development
What you need to be done?
Context
Currently, if I follow the steps for cloning a near account's widgets
It will download the widgets to /widget and create a bos.config.json.
Then I can:
Similarly, you can init an empty bos-workspace via:
Which will print,
Then I will have a project initialized with package.json, scripts, etc.
Ask
I want the option to combine these two commands -- if I provide a "NEAR AccountId deploys your project", and this account exists and has widgets, then I want to be prompted with
"Widgets already exist at this NEAR Account, would you like to import them?"
and if they say yes, then it should clone the widgets in with the correct account in bos.config.json.
Acceptance criteria
bos-workspace init easypoll-v0.ndc-widgets.near
is valid and will skip the first question if it ends in .near (otherwise it will just treat as a [dest] name)Tags
Blockchain, Community, Javascript, Typescript, BOS
Deadline
No response
Currency
USDC
Amount
80
KYC