210e8b60bf
* Converts import script to use public API endpoints The endpoints don't exist yet, but this is a good way to see how the implementation of the data structures differ. * Exposes public API endpoint to fetch user's sketches * Implements public API delete endpoint * Adds helper to create custom ApplicationError classes * Adds create project endpoint that understand API's data structure This transforms the nested tree of file data into a mongoose Project model * Returns '201 Created' to match API spec * Removes 'CustomError' variable assignment as it shows up in test output * transformFiles will return file validation errors * Tests API project controller * Tests toModel() * Creates default files if no root-level .html file is provided * Do not auto-generate a slug if it is provided Fixes a bug where the slug was auto-generated using the sketch name, even if a slug property had been provided. * Validates uniqueness of slugs for projects created by the public API * Adds tests for slug uniqueness * Configures node's Promise implementation for mongoose (fixes warnings) * Moves createProject tests to match controller location * Adds support for code to ApplicationErrors * deleteProject controller tests * getProjectsForUser controller tests - implements tests - update apiKey tests to use new User mocks * Ensure error objects have consistent property names `message` is used as a high-level description of the errors `detail` is optional and has an plain language explanation of the individual errors `errors` is an array of each individual problem from `detail` in a machine-readable format * Assert environment variables are provided at script start * Version public API * Expect "files" property to always be provided * Fixes linting error * Converts import script to use public API endpoints The endpoints don't exist yet, but this is a good way to see how the implementation of the data structures differ. * Exposes public API endpoint to fetch user's sketches * Implements public API delete endpoint * Adds helper to create custom ApplicationError classes * Adds create project endpoint that understand API's data structure This transforms the nested tree of file data into a mongoose Project model * Returns '201 Created' to match API spec * Removes 'CustomError' variable assignment as it shows up in test output * transformFiles will return file validation errors * Tests API project controller * Tests toModel() * Creates default files if no root-level .html file is provided * Do not auto-generate a slug if it is provided Fixes a bug where the slug was auto-generated using the sketch name, even if a slug property had been provided. * Validates uniqueness of slugs for projects created by the public API * Adds tests for slug uniqueness * Configures node's Promise implementation for mongoose (fixes warnings) * Moves createProject tests to match controller location * deleteProject controller tests * Adds support for code to ApplicationErrors * getProjectsForUser controller tests - implements tests - update apiKey tests to use new User mocks * Ensure error objects have consistent property names `message` is used as a high-level description of the errors `detail` is optional and has an plain language explanation of the individual errors `errors` is an array of each individual problem from `detail` in a machine-readable format * Assert environment variables are provided at script start * Version public API * Expect "files" property to always be provided * Fixes linting error * Checks that authenticated user has permission to create under this namespace Previously, the project was always created under the authenticated user's namespace, but this not obvious behaviour. * Splits private and public APIs The private API is under /editor and the public API under /api
93 lines
2.6 KiB
JSON
93 lines
2.6 KiB
JSON
{
|
|
"name": "p5.js Web Editor",
|
|
"description": "The p5.js Web Editor is an in-browser editor for creative coding, specifically for writing p5.js sketches.",
|
|
"repository": "https://github.com/processing/p5.js-web-editor",
|
|
"logo": "https://p5js.org/assets/img/p5js.svg",
|
|
"keywords": ["processing", "p5js", "p5.js"],
|
|
"addons": [
|
|
{
|
|
"plan": "mongolab:sandbox",
|
|
"as": "MONGO"
|
|
},
|
|
{
|
|
"plan": "mailgun:starter",
|
|
"as": "MAILGUN"
|
|
}
|
|
],
|
|
"env": {
|
|
"API_URL": {
|
|
"value": "/editor"
|
|
},
|
|
"AWS_ACCESS_KEY": {
|
|
"description": "AWS Access Key",
|
|
"value": "placeholder"
|
|
},
|
|
"AWS_SECRET_KEY": {
|
|
"description": "AWS Secret Key",
|
|
"value": "placeholder"
|
|
},
|
|
"AWS_REGION": {
|
|
"description": "AWS Region for the S3_BUCKET",
|
|
"value": "placeholder"
|
|
},
|
|
"EMAIL_SENDER": {
|
|
"description": "The sending email address for transactional emails.",
|
|
"value": "no-reply@mydomain.com"
|
|
},
|
|
"EMAIL_VERIFY_SECRET_TOKEN": {
|
|
"description": "A secret key for...? Not sure where used.",
|
|
"generator": "secret"
|
|
},
|
|
"EXAMPLE_USER_EMAIL": {
|
|
"description": "The email address for the account holding the default Example sketches",
|
|
"value": "examples@p5js.org"
|
|
},
|
|
"EXAMPLE_USER_PASSWORD": {
|
|
"value": "hellop5js"
|
|
},
|
|
"GG_EXAMPLES_EMAIL": {
|
|
"description": "The email address for the account holding the Generative Design Example sketches",
|
|
"value": "benedikt.gross@generative-gestaltung.de"
|
|
},
|
|
"GG_EXAMPLES_PASS": {
|
|
"value": "generativedesign"
|
|
},
|
|
"GG_EXAMPLES_USERNAME": {
|
|
"value": "generative-design"
|
|
},
|
|
"GITHUB_ID": {
|
|
"description": "The GitHub Client Id for sign in with GitHub support",
|
|
"value": "placeholder"
|
|
},
|
|
"GITHUB_SECRET": {
|
|
"description": "The GitHub Client Secret",
|
|
"value": "placeholder"
|
|
},
|
|
"GOOGLE_ID": {
|
|
"description": "The Google Client Id for sign in with Google support",
|
|
"value": "placeholder"
|
|
},
|
|
"GOOGLE_SECRET": {
|
|
"description": "The Google Client Secret",
|
|
"value": "placeholder"
|
|
},
|
|
"NODE_ENV": {
|
|
"value": "production"
|
|
},
|
|
"S3_BUCKET": {
|
|
"desription": "Name of the S3 bucket for asset storage",
|
|
"value": "placeholder"
|
|
},
|
|
"S3_BUCKET_URL_BASE": {
|
|
"description": "S3 bucket URL base",
|
|
"required": false
|
|
},
|
|
"SESSION_SECRET": {
|
|
"description": "A secret key for verifying the integrity of signed cookies.",
|
|
"generator": "secret"
|
|
}
|
|
},
|
|
"scripts": {
|
|
"postdeploy": "MONGO_URL=$MONGO_URI MAILGUN_KEY=$MAILGUN_API_KEY npm run fetch-examples:prod"
|
|
}
|
|
}
|