beginner-corp / cli Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
When using the generate scaffold model
on a project to just add a model an error is thrown when loaded in the browser.
We reference <el-header>
and <el-footer>
in the templates and they will not be a random project Or could be deleted by the user before running this generator.
Possibly a path error
For instance, try Moose.
Point generated code to specific docs instead of generic docs.begin.com
Older versions of the CLI were picking up a newer version of @begin/validator so the generated code didn't match the validator installed.
If the app has data
item in @tables
then running begin generate scaffold
will duplicate the data
section.
If you run begin generate scaffold Books
twice the second time it should error our saying the code has already been generated.
And we should alias begin log
to begin logs
.
[I was unsure where to file this, so I'm leaving it here for now since the CLI is where it surfaces]
I think leveldown
runs node-gyp meta stuff.
Begin's deploy logs say:
sh: node-gyp-build: command not found
leveldown belongs to dynalite
npm ls leveldown
enhance-alpine@ /Users/tbeseda/dev/scratch/enhance-alpine
└─┬ @architect/[email protected]
└─┬ [email protected]
└── [email protected]
Steps to reproduce:
Begin version: 0.0.18
✓ ~/git/begin/test-projects/cli/test/new-proj
⮑ begin update --use main
Checking for latest version
Downloading https://dl.begin.com/releases/main/begin-x64-darwin.zip (25.31 MiB)
Got 25.31 MiB of 25.31 MiB (100%)
Upgrading Begin to main-0259b9a
Updated /Users/begin/.begin/begin
Successfully upgraded Begin!
✓ ~/git/begin/test-projects/cli/test/new-proj
⮑ begin update --use latest
Checking for latest version
Error: Invalid Version: main-0259b9a
``
Maybe because these are legacy, but I can't destroy any app:
begin app list
'testing' (app ID: CZPMLBHM)
├── 'staging' (env ID: C46XWSSTF): https://color-l1n.begin.app
└── 'anotherOne' (env ID: CDFL24RDP): https://create-wnt.begin.app
'foobar' (app ID: DSQSDJNJ)
└── (no app environments)
'idk' (app ID: DVRSZ9GB)
└── (no app environments)
'CLI test' (app ID: HDQ7P0J7)
└── (no app environments)
'test3' (app ID: KVGPLVRP)
└── (no app environments)
'test2' (app ID: LHW49476)
└── (no app environments)
begin app destroy --app LHW49476
Error: No Begin app found to destroy
I can destroy apps I just created.
Probably just need to reset my account and delete all apps.
If you have a terminal open with begin dev
running and you try and run it from another terminal then the error is:
Begin dev server (0.0.29)
✓ Sandbox Found Architect project manifest: .arc
✓ Sandbox No custom testing environment variables found
Then it exits.
Warn users what to do if initial install fails.
Something not right re. mode switching, see CLI output below for steps:
⮑ begin -v
...
Begin version: main-06fcbbb
⮑ begin update --use latest
Checking for latest version
Error: Invalid Version: main-06fcbbb
Using this schemas:
{
"$id": "https://example.com/schemas/customer",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"first_name": { "type": "string" },
"last_name": { "type": "string" },
"shipping_address": { "$ref": "/schemas/address" },
"billing_address": { "$ref": "/schemas/address" }
},
"required": ["first_name", "last_name", "shipping_address", "billing_address"],
"$defs": {
"address": {
"$id": "/schemas/address",
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"street_address": { "type": "string" },
"city": { "type": "string" },
"state": { "$ref": "#/definitions/state" }
},
"required": ["street_address", "city", "state"],
"definitions": {
"state": { "enum": ["CA", "NY", "... etc ..."] }
}
}
}
}
Should produce a form with two text inputs followed by two address inputs.
Should a Begin build fail for strange or unusual circumstances, we are currently getting the following build exception: Error: Begin exception: undefined
We need to fix whatever error bubbling we expect to be happening here.
The Begin build container should be able to use git and npm install git repos within builds.
Inside an app that hasn't been deployed:
begin app deploy
This project doesn't appear to be associated with a Begin app
? Would you like to create a Begin app based on this project? (Y/n) · true
? What would you like to name your app? · enhance-alpine
? What would you like to name your first environment? · staging
Added appID 'ZDLV8856' to project, be sure to commit this change!
Archived project in 113ms
Uploading project in 1 part
Error: app_not_found
I deployed an app via begin app create
and after successful app creation I hit the apps /games
route.
If produces and error in the browser of:
{"message":"Internal Server Error"}
When I request the logs from the app using begin logs
I get the following output which seems to indicate a permissions issue in access DynamoDB:
2022-09-22 13:30:08.134: START RequestId: c0ac7ff2-180e-4cbf-a843-aa655d8720d2 Version: $LATEST
2022-09-22 13:30:08.529: 2022-09-22T13:30:08.525Z c0ac7ff2-180e-4cbf-a843-aa655d8720d2 ERROR Invoke Error {"errorType":"AccessDeniedException","errorMessage":"User: arn:aws:sts::077166351318:assumed-role/A7JVBLPN0-Role-15FX9TMVNOFSS/A7JVBLPN0-AnyCatchallHTTPLambda-YYWmJVKObQNh is not authorized to perform: ssm:GetParameter on resource: arn:aws:ssm:us-west-2:077166351318:parameter/Issue2Staging/tables/data because no identity-based policy allows the ssm:GetParameter action","code":"AccessDeniedException","message":"User: arn:aws:sts::077166351318:assumed-role/A7JVBLPN0-Role-15FX9TMVNOFSS/A7JVBLPN0-AnyCatchallHTTPLambda-YYWmJVKObQNh is not authorized to perform: ssm:GetParameter on resource: arn:aws:ssm:us-west-2:077166351318:parameter/Issue2Staging/tables/data because no identity-based policy allows the ssm:GetParameter action","time":"2022-09-22T13:30:08.522Z","requestId":"1167fe27-582b-42dd-b401-6d97913b998c","statusCode":400,"retryable":false,"retryDelay":33.880872459309956,"stack":["AccessDeniedException: User: arn:aws:sts::077166351318:assumed-role/A7JVBLPN0-Role-15FX9TMVNOFSS/A7JVBLPN0-AnyCatchallHTTPLambda-YYWmJVKObQNh is not authorized to perform: ssm:GetParameter on resource: arn:aws:ssm:us-west-2:077166351318:parameter/Issue2Staging/tables/data because no identity-based policy allows the ssm:GetParameter action"," at Request.extractError (/var/runtime/node_modules/aws-sdk/lib/protocol/json.js:52:27)"," at Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:106:20)"," at Request.emit (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:78:10)"," at Request.emit (/var/runtime/node_modules/aws-sdk/lib/request.js:686:14)"," at Request.transition (/var/runtime/node_modules/aws-sdk/lib/request.js:22:10)"," at AcceptorStateMachine.runTo (/var/runtime/node_modules/aws-sdk/lib/state_machine.js:14:12)"," at /var/runtime/node_modules/aws-sdk/lib/state_machine.js:26:10"," at Request.<anonymous> (/var/runtime/node_modules/aws-sdk/lib/request.js:38:9)"," at Request.<anonymous> (/var/runtime/node_modules/aws-sdk/lib/request.js:688:12)"," at Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:116:18)"]}
2022-09-22 13:30:08.533: REPORT RequestId: c0ac7ff2-180e-4cbf-a843-aa655d8720d2 Duration: 397.07 ms Billed Duration: 398 ms Memory Size: 1152 MB Max Memory Used: 86 MB
2022-09-22 13:30:08.533: END RequestId: c0ac7ff2-180e-4cbf-a843-aa655d8720d2
2022-09-22 13:30:08.723: START RequestId: aa0860ad-8e3f-465a-a030-aa52d0021afb Version: $LATEST
2022-09-22 13:30:08.745: REPORT RequestId: aa0860ad-8e3f-465a-a030-aa52d0021afb Duration: 21.45 ms Billed Duration: 22 ms Memory Size: 1152 MB Max Memory Used: 86 MB
2022-09-22 13:30:08.745: END RequestId: aa0860ad-8e3f-465a-a030-aa52d0021afb
If you run generate before creating a project it throws an error and should instead gracefully report you must create a project first.
⮑ begin generate scaffold Game day:date time:time facility:string
Installing aws-sdk as a development dependency
Installing npm dependencies
(node:31474) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open './package.json'
at Object.openSync (fs.js:497:3)
at Object.openSync (pkg/prelude/bootstrap.js:739:32)
at Object.readFileSync (fs.js:393:35)
at readFileSync (pkg/prelude/bootstrap.js:1025:36)
at installDependencies (/snapshot/cli/src/lib/npm-commands.js)
at generate (/snapshot/cli/src/commands/generate/generators/_generate/index.js)
at Object.action (/snapshot/cli/src/commands/generate/generators/scaffold/action.js)
at action (/snapshot/cli/src/commands/generate/index.js)
at process.runNextTicks [as _tickCallback] (internal/process/task_queues.js:60:5)
at Function.runMain (pkg/prelude/bootstrap.js:1848:13)
(Use `begin --trace-warnings ...` to show where the warning was created)
(node:31474) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:31474) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
think it makes sense to colocate schemas w the models
Default to node
runtime and disable selecting ruby
, deno
, python
for now.
Fix: npm i aws-sdk
in the root.
Because the shell interprets $
we should have an example that shows how to add a page or api using a path parameter like:
begin new page -p '/users/$id/shindigs'
Source:
https://discord.com/channels/1012099764713705472/1012435743571988560/1020345614866862091
For problems that are based on the entire form instead of one field.
If the app has auth added to it via the begin generate auth
command when adding new pages/routes/api's there should be an option to add the auth check code to the generated code.
When you run begin dev
even if you enable livereload in the arc file it doesn't seem to work.
devDependencies
key w deps @architect/sandbox
and eslint
(also missing eslint config in package.json
)lint
command from scripts
When I deploy a new app it reports app not found error. This may be because another build is stalled while building. I don't know how simultaneous builds affect each other.
➜ enhance.dev git:(test-begin-deploy) begin deploy
This project doesn't appear to be associated with a Begin app
? Would you like to create a Begin app based on this project? (Y/n) · true
? What would you like to name your app? · test-edotdev
? What would you like to name your first environment? · staging
Added appID 'RNMN9KHW' to project, be sure to commit this change!
Archived project in 317ms
Uploading project in 1 part
Error: app_not_found
➜ enhance.dev git:(test-begin-deploy) ✗
A new generator that sets up testing in your project.
If the property is in a sub schema then it should use the name property.subproperty
to make validation easier.
Multiple reports of deploys stalling (and eventually timing) out. Repro steps:
begin new project -p test-project
cd test-project
begin generate scaffold Game day:date time:time facility:string
The CLI should think projects with .arc
files are valid projects.
Data shows up in list but not in edit.
It would be helpful to get a list of my apps and their environments from the CLI. ID
s are helpful for destroying resources.
Maybe like
$ begin app list|ls --account|--all|-a
test-app <appID>
├── staging <envID>
└── fooBar <envID>
test2
└── production <envID>
This example lists all apps/envs in my account, but maybe there's a contextual variation in a project
~/myProject $ begin app list
my-project
└── fooBar <envID>
Or maybe the list
command isn't a subcommand of app
?
$ begin account apps
...
Pulling in the latest arc-plugin-enhance results in the following error when you also run begin generate scaffold
.
Error: Validation error:
- Plugin requires conflicting @tables item: data, plugin: enhance/arc-plugin-enhance, method: set.undefined
generating a new project the package.json
is on one line; would be nice to hit it w JSON.stringify(pkg, null, 2)
before write
Steps to reproduce:
begin new project --name new-proj --p ./new-proj
begin dev
. This should produce the error:Error: Cannot find module './app'
Require stack:
- /snapshot/cli/node_modules/@architect/hydrate/node_modules/@architect/inventory/src/config/pragmas/index.js
- /snapshot/cli/node_modules/@architect/hydrate/node_modules/@architect/inventory/src/config/index.js
- /snapshot/cli/node_modules/@architect/hydrate/node_modules/@architect/inventory/src/index.js
- /snapshot/cli/node_modules/@architect/hydrate/src/hydrate.js
- /snapshot/cli/node_modules/@architect/hydrate/src/index.js
- /snapshot/cli/node_modules/@architect/sandbox/src/sandbox/index.js
- /snapshot/cli/node_modules/@architect/sandbox/src/index.js
- /snapshot/cli/node_modules/@architect/sandbox/src/cli/index.js
- /snapshot/cli/src/commands/dev/index.js
- /snapshot/cli/src/commands/index.js
- /snapshot/cli/src/index.js
1) If you want to compile the package/file into executable, please pay attention to compilation warnings and specify a literal in 'require' call. 2) If you don't want to compile the package/file into executable and want to 'require' it from filesystem (likely plugin), specify an absolute path in 'require' call using process.cwd() or process.execPath.
This just started happening after @architect/sandbox
v5.3.2 was released.
If you:
32228e436abf0a1ea691801510416ba06ab3dcae
@architect/sandbox
dependency to v5.3.2npm run build
begin dev
starts without complaint.I'm at a loss as to why the updated @architect/sandbox
package would affect the compiled binary.
begin new page -p '/books/new'
produces an element name of page--books-new
. The double dash is wrong.
The stack trace is:
Error: Cannot find module './app'
Require stack:
- /snapshot/cli/node_modules/@architect/hydrate/node_modules/@architect/inventory/src/config/pragmas/index.js
- /snapshot/cli/node_modules/@architect/hydrate/node_modules/@architect/inventory/src/config/index.js
- /snapshot/cli/node_modules/@architect/hydrate/node_modules/@architect/inventory/src/index.js
- /snapshot/cli/node_modules/@architect/hydrate/src/hydrate.js
- /snapshot/cli/node_modules/@architect/hydrate/src/index.js
- /snapshot/cli/node_modules/@architect/sandbox/src/sandbox/index.js
- /snapshot/cli/node_modules/@architect/sandbox/src/index.js
- /snapshot/cli/node_modules/@architect/sandbox/src/cli/index.js
- /snapshot/cli/src/commands/dev/index.js
- /snapshot/cli/src/commands/index.js
- /snapshot/cli/src/index.js
- /snapshot/cli/src/_main.js
1) If you want to compile the package/file into executable, please pay attention to compilation warnings and specify a literal in 'require' call. 2) If you don't want to compile the package/file into executable and want to 'require' it from filesystem (likely plugin), specify an absolute path in 'require' call using process.cwd() or process.execPath.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.