-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/deploy #82
Feat/deploy #82
Conversation
console.log("not yet supported"); | ||
.description("Deploy the project") | ||
.argument("[string]", "Workspace app name to deploy") | ||
.option("--deploy-account-id <deployAccountId>", "Account under which component code should be deployed") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This all looks good, can you run bw help
and update the README with this new command?
tests/unit/deploy.ts
Outdated
global.log = unmockedLog; | ||
}) | ||
|
||
it('should build correctly without logs', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like how you've set up these tests so far -- for test cases, I'm thinking:
- should match expected input for bos-cli-rs (src/widget -> src), isolate that function in code call it "translate"
- should exec with correct command -> compare the the exec method call after running deployApp
lib/deploy.ts
Outdated
|
||
const config = await readConfig(path.join(src, "bos.config.json"), opts.network); | ||
|
||
// Move files from "src/widget" to "src/" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, how about moving L25-53 to a "translate" or "translateForBosCli" function so we can test it?
Resolve #77 |
tests/unit/build.ts
Outdated
@@ -47,9 +47,9 @@ const app_example_1_output = { | |||
"/build/ipfs.json": JSON.stringify({ | |||
"logo.svg": "QmHash", | |||
}, null, 2) + "\n", | |||
"/build/src/widget/hello.utils.module.js": "const hello = (name) => `Hello, ${name}!`;\nreturn { hello };\n", | |||
"/build/src/widget/hello/utils.module.js": "const hello = (name) => `Hello, ${name}!`;\nreturn { hello };\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be a dot, not /
tests/unit/build.ts
Outdated
"/build/src/widget/index.jsx": "const hello = \"hi\";\nreturn hello(props);\n", | ||
"/build/src/widget/nested.index.jsx": "const hello = \"hi\";\nreturn hello(props);\n", | ||
"/build/src/widget/nested/index.jsx": "const hello = \"hi\";\nreturn hello(props);\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here too
tests/unit/build.ts
Outdated
@@ -118,7 +118,7 @@ const app_example_2_output = { | |||
"/build/ipfs.json": JSON.stringify({ | |||
"logo.svg": "QmHash", | |||
}, null, 2) + "\n", | |||
"/build/src/widget/hello.utils.module.js": "const hello = (name) => `Hello, ${name}!`;\nreturn { hello };\n", | |||
"/build/src/widget/hello/utils.module.js": "const hello = (name) => `Hello, ${name}!`;\nreturn { hello };\n", | |||
"/build/src/widget/index.jsx": "const hello = \"hi\";\nreturn hello(props);\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here
Draft #77