diff --git a/src/http/any-catchall/index.mjs b/src/http/any-catchall/index.mjs index 2039c189..7b2a50b6 100644 --- a/src/http/any-catchall/index.mjs +++ b/src/http/any-catchall/index.mjs @@ -11,7 +11,7 @@ import algolia from '@architect/views/modules/components/algolia.mjs' const staticProxy = asap({ alias: { '/playground': '/playground.html' }, passthru: true, - spa: false + spa: false, }) async function robots (req) { @@ -34,8 +34,8 @@ async function notFound (req) { html: NotFound({ term }), scripts: [ '/index.js' ], thirdparty: algolia, - toc - }) + toc, + }), } } diff --git a/src/http/get-api-package/index.mjs b/src/http/get-api-package/index.mjs index 98773237..c731e163 100644 --- a/src/http/get-api-package/index.mjs +++ b/src/http/get-api-package/index.mjs @@ -15,12 +15,12 @@ export async function handler (req) { body = JSON.stringify({ name: e.name, message: e.message, - stack: e.stack + stack: e.stack, }) } return { statusCode, - body + body, } } diff --git a/src/http/get-docs-000lang-catchall/index.mjs b/src/http/get-docs-000lang-catchall/index.mjs index a52170d1..9856b3a8 100644 --- a/src/http/get-docs-000lang-catchall/index.mjs +++ b/src/http/get-docs-000lang-catchall/index.mjs @@ -34,6 +34,7 @@ async function handler (req) { editURL += join(lang, ...parts, doc) const filePath = join( + new URL('.', import.meta.url).pathname, 'node_modules', '@architect', @@ -63,7 +64,7 @@ async function handler (req) { markdownItAnchor: { permalink: anchor.permalink.headerLink({ class: 'text-p1 text-h1 text-a2 no-underline underline-h', - }) + }), }, }, }) @@ -106,7 +107,7 @@ async function handler (req) { state: { notFoundTerm: docName }, thirdparty: algolia(lang), toc, - }) + }), } } } diff --git a/src/http/get-docs-000lang-catchall/markdown-class-mappings.mjs b/src/http/get-docs-000lang-catchall/markdown-class-mappings.mjs index 69743c25..d254bd62 100644 --- a/src/http/get-docs-000lang-catchall/markdown-class-mappings.mjs +++ b/src/http/get-docs-000lang-catchall/markdown-class-mappings.mjs @@ -2,43 +2,43 @@ export default { h1: [ 'mb3', 'font-semibold', - 'text5' + 'text5', ], h2: [ 'mt3', 'mb-1', 'font-semibold', - 'text4' + 'text4', ], h3: [ 'mt3', 'mb-1', 'font-semibold', - 'text3' + 'text3', ], h4: [ 'mt3', 'mb-1', 'font-semibold', - 'text2' + 'text2', ], h5: [ 'mt3', 'mb-1', 'font-semibold', - 'text1' + 'text1', ], p: [ - 'mb-1' + 'mb-1', ], ol: [ - 'mb1' + 'mb1', ], ul: [ - 'mb1' + 'mb1', ], li: [ - 'ml-1' + 'ml-1', ], blockquote: [ 'mb-1', @@ -50,7 +50,7 @@ export default { 'border-r0', 'border-b0', 'border-l4', - 'border-g3' + 'border-g3', ], a: [ 'font-medium', @@ -67,7 +67,7 @@ export default { ], strong: [ 'font-semibold', - 'text-g9' + 'text-g9', ], table: [ 'w-full', @@ -75,7 +75,7 @@ export default { 'border-collapse', 'border-solid', 'border-g3', - 'border1' + 'border1', ], th: [ 'pt-3', @@ -85,7 +85,7 @@ export default { 'border-solid', 'border1', 'border-g3', - 'bg-g1' + 'bg-g1', ], td: [ 'pt-3', @@ -96,5 +96,5 @@ export default { 'border-g1', 'border1', 'bg-g0', - ] + ], } diff --git a/src/http/get-index/index.mjs b/src/http/get-index/index.mjs index 31efaa39..a33d1380 100644 --- a/src/http/get-index/index.mjs +++ b/src/http/get-index/index.mjs @@ -17,7 +17,7 @@ export async function handler () { 'cache-control': process.env.ARC_ENV === 'production' ? 'max-age=86400' : 'no-cache, no-store, must-revalidate, max-age=0, s-maxage=0', - 'content-type': 'text/html; charset=utf8' + 'content-type': 'text/html; charset=utf8', }, body: html` @@ -81,6 +81,6 @@ export async function handler () { -` +`, } } diff --git a/src/plugins/spellcheck.js b/src/plugins/spellcheck.js index 71a697e4..5897ad33 100644 --- a/src/plugins/spellcheck.js +++ b/src/plugins/spellcheck.js @@ -34,6 +34,6 @@ module.exports = { res() }) }) - } - } + }, + }, } diff --git a/src/shared/not-found-response.mjs b/src/shared/not-found-response.mjs index 9bf97fce..59be5242 100644 --- a/src/shared/not-found-response.mjs +++ b/src/shared/not-found-response.mjs @@ -2,7 +2,7 @@ export default { statusCode: 404, headers: { 'cache-control': 'no-cache, no-store, must-revalidate, max-age=0, s-maxage=0', - 'content-type': 'text/html; charset=utf8' + 'content-type': 'text/html; charset=utf8', }, - body: '

404: Not found

' + body: '

404: Not found

', } diff --git a/src/shared/redirect-map.mjs b/src/shared/redirect-map.mjs index 49ef3e12..b803eeb4 100644 --- a/src/shared/redirect-map.mjs +++ b/src/shared/redirect-map.mjs @@ -269,8 +269,8 @@ export async function redirect (req) { return { statusCode: tempRedirects[reqPath] ? 302 : 301, headers: { - location - } + location, + }, } } return diff --git a/src/views/docs/table-of-contents.mjs b/src/views/docs/table-of-contents.mjs index 9102f234..28d77cf9 100644 --- a/src/views/docs/table-of-contents.mjs +++ b/src/views/docs/table-of-contents.mjs @@ -25,8 +25,8 @@ const Guides = [ 'GitHub Actions', 'GitLab Pipelines', 'AWS EC2', - ] - } + ], + }, ], 'Frontend': [ 'Sessions', @@ -103,7 +103,7 @@ const About = [ 'Contribute', 'Upgrade guide', 'Playground', - 'Ejecting from Architect' + 'Ejecting from Architect', ] export default { diff --git a/src/views/landing/support/arc-codes.mjs b/src/views/landing/support/arc-codes.mjs index c5aa8d11..8be2cac1 100644 --- a/src/views/landing/support/arc-codes.mjs +++ b/src/views/landing/support/arc-codes.mjs @@ -29,11 +29,11 @@ export const cloudformation = { { 'Effect': 'Allow', 'Principal': { - 'Service': 'lambda.amazonaws.com' + 'Service': 'lambda.amazonaws.com', }, - 'Action': 'sts:AssumeRole' - } - ] + 'Action': 'sts:AssumeRole', + }, + ], }, 'Policies': [ { @@ -46,12 +46,12 @@ export const cloudformation = { 'logs:CreateLogGroup', 'logs:CreateLogStream', 'logs:PutLogEvents', - 'logs:DescribeLogStreams' + 'logs:DescribeLogStreams', ], - 'Resource': 'arn:aws:logs:*:*:*' - } - ] - } + 'Resource': 'arn:aws:logs:*:*:*', + }, + ], + }, }, { 'PolicyName': 'ArcStaticBucketPolicy', @@ -64,7 +64,7 @@ export const cloudformation = { 's3:PutObject', 's3:PutObjectAcl', 's3:DeleteObject', - 's3:ListBucket' + 's3:ListBucket', ], 'Resource': [ { @@ -72,28 +72,28 @@ export const cloudformation = { 'arn:aws:s3:::${bukkit}', { 'bukkit': { - 'Ref': 'StaticBucket' - } - } - ] + 'Ref': 'StaticBucket', + }, + }, + ], }, { 'Fn::Sub': [ 'arn:aws:s3:::${bukkit}/*', { 'bukkit': { - 'Ref': 'StaticBucket' - } - } - ] - } - ] - } - ] - } - } - ] - } + 'Ref': 'StaticBucket', + }, + }, + ], + }, + ], + }, + ], + }, + }, + ], + }, }, 'StaticBucketParam': { 'Type': 'AWS::SSM::Parameter', @@ -103,14 +103,14 @@ export const cloudformation = { 'Fn::Sub': [ '/${AWS::StackName}/static/${key}', { - 'key': 'bucket' - } - ] + 'key': 'bucket', + }, + ], }, 'Value': { - 'Ref': 'StaticBucket' - } - } + 'Ref': 'StaticBucket', + }, + }, }, 'StaticFingerprintParam': { 'Type': 'AWS::SSM::Parameter', @@ -120,12 +120,12 @@ export const cloudformation = { 'Fn::Sub': [ '/${AWS::StackName}/static/${key}', { - 'key': 'fingerprint' - } - ] + 'key': 'fingerprint', + }, + ], }, - 'Value': 'true' - } + 'Value': 'true', + }, }, 'ParameterStorePolicy': { 'Type': 'AWS::IAM::Policy', @@ -138,49 +138,49 @@ export const cloudformation = { 'Effect': 'Allow', 'Action': [ 'ssm:GetParametersByPath', - 'ssm:GetParameter' + 'ssm:GetParameter', ], 'Resource': { 'Fn::Sub': [ 'arn:aws:ssm:${AWS::Region}:${AWS::AccountId}:parameter/${AWS::StackName}', - {} - ] - } + {}, + ], + }, }, { 'Effect': 'Allow', 'Action': [ 'ssm:GetParametersByPath', - 'ssm:GetParameter' + 'ssm:GetParameter', ], 'Resource': { 'Fn::Sub': [ 'arn:aws:ssm:${AWS::Region}:${AWS::AccountId}:parameter/${AWS::StackName}/*', - {} - ] - } + {}, + ], + }, }, { 'Effect': 'Allow', 'Action': [ 'ssm:GetParametersByPath', - 'ssm:GetParameter' + 'ssm:GetParameter', ], 'Resource': { 'Fn::Sub': [ 'arn:aws:ssm:${AWS::Region}:${AWS::AccountId}:parameter/${AWS::StackName}/*/*', - {} - ] - } - } - ] + {}, + ], + }, + }, + ], }, 'Roles': [ { - 'Ref': 'Role' - } - ] - } + 'Ref': 'Role', + }, + ], + }, }, 'HTTP': { 'Type': 'AWS::Serverless::HttpApi', @@ -190,8 +190,8 @@ export const cloudformation = { 'openapi': '3.0.1', 'info': { 'title': { - 'Ref': 'AWS::StackName' - } + 'Ref': 'AWS::StackName', + }, }, 'paths': { '/docs/{lang}/{proxy+}': { @@ -201,11 +201,11 @@ export const cloudformation = { 'type': 'aws_proxy', 'httpMethod': 'POST', 'uri': { - 'Fn::Sub': 'arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${GetDocsLangCatchallHTTPLambda.Arn}/invocations' + 'Fn::Sub': 'arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${GetDocsLangCatchallHTTPLambda.Arn}/invocations', }, - 'connectionType': 'INTERNET' - } - } + 'connectionType': 'INTERNET', + }, + }, }, '/api/package': { 'get': { @@ -214,11 +214,11 @@ export const cloudformation = { 'type': 'aws_proxy', 'httpMethod': 'POST', 'uri': { - 'Fn::Sub': 'arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${GetApiPackageHTTPLambda.Arn}/invocations' + 'Fn::Sub': 'arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${GetApiPackageHTTPLambda.Arn}/invocations', }, - 'connectionType': 'INTERNET' - } - } + 'connectionType': 'INTERNET', + }, + }, }, '/landing': { 'get': { @@ -227,11 +227,11 @@ export const cloudformation = { 'type': 'aws_proxy', 'httpMethod': 'POST', 'uri': { - 'Fn::Sub': 'arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${GetLandingHTTPLambda.Arn}/invocations' + 'Fn::Sub': 'arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${GetLandingHTTPLambda.Arn}/invocations', }, - 'connectionType': 'INTERNET' - } - } + 'connectionType': 'INTERNET', + }, + }, }, '/{proxy+}': { 'x-amazon-apigateway-any-method': { @@ -240,11 +240,11 @@ export const cloudformation = { 'type': 'aws_proxy', 'httpMethod': 'POST', 'uri': { - 'Fn::Sub': 'arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${AnyCatchallHTTPLambda.Arn}/invocations' + 'Fn::Sub': 'arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${AnyCatchallHTTPLambda.Arn}/invocations', }, - 'connectionType': 'INTERNET' - } - } + 'connectionType': 'INTERNET', + }, + }, }, '/_static/{proxy+}': { 'get': { @@ -257,19 +257,19 @@ export const cloudformation = { 'https://${bukkit}.s3.${AWS::Region}.amazonaws.com/{proxy}', { 'bukkit': { - 'Ref': 'StaticBucket' - } - } - ] + 'Ref': 'StaticBucket', + }, + }, + ], }, 'connectionType': 'INTERNET', - 'timeoutInMillis': 30000 - } - } - } - } - } - } + 'timeoutInMillis': 30000, + }, + }, + }, + }, + }, + }, }, 'GetDocsLangCatchallHTTPLambda': { 'Type': 'AWS::Serverless::Function', @@ -278,11 +278,11 @@ export const cloudformation = { 'CodeUri': '/var/task/src/http/get-docs-000lang-catchall', 'Runtime': 'nodejs20.x', 'Architectures': [ - 'arm64' + 'arm64', ], 'MemorySize': 1152, 'EphemeralStorage': { - 'Size': 512 + 'Size': 512, }, 'Timeout': 5, 'Environment': { @@ -290,26 +290,26 @@ export const cloudformation = { 'ARC_APP_NAME': 'arc-codes', 'ARC_ENV': 'staging', 'ARC_ROLE': { - 'Ref': 'Role' + 'Ref': 'Role', }, 'ARC_SESSION_TABLE_NAME': 'jwe', 'ARC_STACK_NAME': { - 'Ref': 'AWS::StackName' + 'Ref': 'AWS::StackName', }, 'ARC_STATIC_BUCKET': { - 'Ref': 'StaticBucket' - } - } + 'Ref': 'StaticBucket', + }, + }, }, 'Role': { 'Fn::Sub': [ 'arn:aws:iam::${AWS::AccountId}:role/${roleName}', { 'roleName': { - 'Ref': 'Role' - } - } - ] + 'Ref': 'Role', + }, + }, + ], }, 'Events': { 'GetDocsLangCatchallHTTPEvent': { @@ -318,18 +318,18 @@ export const cloudformation = { 'Path': '/docs/{lang}/{proxy+}', 'Method': 'GET', 'ApiId': { - 'Ref': 'HTTP' - } - } - } - } + 'Ref': 'HTTP', + }, + }, + }, + }, }, 'ArcMetadata': { 'pragma': 'http', 'name': 'get /docs/:lang/*', 'method': 'get', - 'path': '/docs/:lang/*' - } + 'path': '/docs/:lang/*', + }, }, 'GetApiPackageHTTPLambda': { 'Type': 'AWS::Serverless::Function', @@ -338,11 +338,11 @@ export const cloudformation = { 'CodeUri': '/var/task/src/http/get-api-package', 'Runtime': 'nodejs20.x', 'Architectures': [ - 'arm64' + 'arm64', ], 'MemorySize': 1152, 'EphemeralStorage': { - 'Size': 512 + 'Size': 512, }, 'Timeout': 5, 'Environment': { @@ -350,26 +350,26 @@ export const cloudformation = { 'ARC_APP_NAME': 'arc-codes', 'ARC_ENV': 'staging', 'ARC_ROLE': { - 'Ref': 'Role' + 'Ref': 'Role', }, 'ARC_SESSION_TABLE_NAME': 'jwe', 'ARC_STACK_NAME': { - 'Ref': 'AWS::StackName' + 'Ref': 'AWS::StackName', }, 'ARC_STATIC_BUCKET': { - 'Ref': 'StaticBucket' - } - } + 'Ref': 'StaticBucket', + }, + }, }, 'Role': { 'Fn::Sub': [ 'arn:aws:iam::${AWS::AccountId}:role/${roleName}', { 'roleName': { - 'Ref': 'Role' - } - } - ] + 'Ref': 'Role', + }, + }, + ], }, 'Events': { 'GetApiPackageHTTPEvent': { @@ -378,18 +378,18 @@ export const cloudformation = { 'Path': '/api/package', 'Method': 'GET', 'ApiId': { - 'Ref': 'HTTP' - } - } - } - } + 'Ref': 'HTTP', + }, + }, + }, + }, }, 'ArcMetadata': { 'pragma': 'http', 'name': 'get /api/package', 'method': 'get', - 'path': '/api/package' - } + 'path': '/api/package', + }, }, 'GetLandingHTTPLambda': { 'Type': 'AWS::Serverless::Function', @@ -398,11 +398,11 @@ export const cloudformation = { 'CodeUri': '/var/task/src/http/get-landing', 'Runtime': 'nodejs20.x', 'Architectures': [ - 'arm64' + 'arm64', ], 'MemorySize': 1152, 'EphemeralStorage': { - 'Size': 512 + 'Size': 512, }, 'Timeout': 5, 'Environment': { @@ -410,26 +410,26 @@ export const cloudformation = { 'ARC_APP_NAME': 'arc-codes', 'ARC_ENV': 'staging', 'ARC_ROLE': { - 'Ref': 'Role' + 'Ref': 'Role', }, 'ARC_SESSION_TABLE_NAME': 'jwe', 'ARC_STACK_NAME': { - 'Ref': 'AWS::StackName' + 'Ref': 'AWS::StackName', }, 'ARC_STATIC_BUCKET': { - 'Ref': 'StaticBucket' - } - } + 'Ref': 'StaticBucket', + }, + }, }, 'Role': { 'Fn::Sub': [ 'arn:aws:iam::${AWS::AccountId}:role/${roleName}', { 'roleName': { - 'Ref': 'Role' - } - } - ] + 'Ref': 'Role', + }, + }, + ], }, 'Events': { 'GetLandingHTTPEvent': { @@ -438,18 +438,18 @@ export const cloudformation = { 'Path': '/landing', 'Method': 'GET', 'ApiId': { - 'Ref': 'HTTP' - } - } - } - } + 'Ref': 'HTTP', + }, + }, + }, + }, }, 'ArcMetadata': { 'pragma': 'http', 'name': 'get /landing', 'method': 'get', - 'path': '/landing' - } + 'path': '/landing', + }, }, 'AnyCatchallHTTPLambda': { 'Type': 'AWS::Serverless::Function', @@ -458,11 +458,11 @@ export const cloudformation = { 'CodeUri': '/var/task/src/http/any-catchall', 'Runtime': 'nodejs20.x', 'Architectures': [ - 'arm64' + 'arm64', ], 'MemorySize': 1152, 'EphemeralStorage': { - 'Size': 512 + 'Size': 512, }, 'Timeout': 5, 'Environment': { @@ -470,27 +470,27 @@ export const cloudformation = { 'ARC_APP_NAME': 'arc-codes', 'ARC_ENV': 'staging', 'ARC_ROLE': { - 'Ref': 'Role' + 'Ref': 'Role', }, 'ARC_SESSION_TABLE_NAME': 'jwe', 'ARC_STACK_NAME': { - 'Ref': 'AWS::StackName' + 'Ref': 'AWS::StackName', }, 'ARC_STATIC_BUCKET': { - 'Ref': 'StaticBucket' + 'Ref': 'StaticBucket', }, - 'ARC_STATIC_SPA': false - } + 'ARC_STATIC_SPA': false, + }, }, 'Role': { 'Fn::Sub': [ 'arn:aws:iam::${AWS::AccountId}:role/${roleName}', { 'roleName': { - 'Ref': 'Role' - } - } - ] + 'Ref': 'Role', + }, + }, + ], }, 'Events': { 'AnyCatchallHTTPEvent': { @@ -499,18 +499,18 @@ export const cloudformation = { 'Path': '/{proxy+}', 'Method': 'ANY', 'ApiId': { - 'Ref': 'HTTP' - } - } - } - } + 'Ref': 'HTTP', + }, + }, + }, + }, }, 'ArcMetadata': { 'pragma': 'http', 'name': 'any /*', 'method': 'any', - 'path': '/*' - } + 'path': '/*', + }, }, 'StaticBucket': { 'Type': 'AWS::S3::Bucket', @@ -518,34 +518,34 @@ export const cloudformation = { 'OwnershipControls': { 'Rules': [ { - 'ObjectOwnership': 'BucketOwnerEnforced' - } - ] + 'ObjectOwnership': 'BucketOwnerEnforced', + }, + ], }, 'WebsiteConfiguration': { 'IndexDocument': 'index.html', - 'ErrorDocument': '404.html' + 'ErrorDocument': '404.html', }, 'PublicAccessBlockConfiguration': { 'BlockPublicAcls': false, 'BlockPublicPolicy': false, 'IgnorePublicAcls': false, - 'RestrictPublicBuckets': false - } - } + 'RestrictPublicBuckets': false, + }, + }, }, 'StaticBucketPolicy': { 'Type': 'AWS::S3::BucketPolicy', 'Properties': { 'Bucket': { - 'Ref': 'StaticBucket' + 'Ref': 'StaticBucket', }, 'PolicyDocument': { 'Version': '2012-10-17', 'Statement': [ { 'Action': [ - 's3:GetObject' + 's3:GetObject', ], 'Effect': 'Allow', 'Principal': '*', @@ -555,18 +555,18 @@ export const cloudformation = { 'arn:aws:s3:::${bukkit}/*', { 'bukkit': { - 'Ref': 'StaticBucket' - } - } - ] - } + 'Ref': 'StaticBucket', + }, + }, + ], + }, ], - 'Sid': 'PublicReadGetObject' - } - ] - } - } - } + 'Sid': 'PublicReadGetObject', + }, + ], + }, + }, + }, }, 'Outputs': { 'API': { @@ -576,17 +576,17 @@ export const cloudformation = { 'https://${ApiId}.execute-api.${AWS::Region}.amazonaws.com', { 'ApiId': { - 'Ref': 'HTTP' - } - } - ] - } + 'Ref': 'HTTP', + }, + }, + ], + }, }, 'ApiId': { 'Description': 'API ID (ApiId)', 'Value': { - 'Ref': 'HTTP' - } + 'Ref': 'HTTP', + }, }, 'BucketURL': { 'Description': 'Bucket URL', @@ -595,11 +595,11 @@ export const cloudformation = { 'http://${bukkit}.s3-website-${AWS::Region}.amazonaws.com', { 'bukkit': { - 'Ref': 'StaticBucket' - } - } - ] - } - } - } + 'Ref': 'StaticBucket', + }, + }, + ], + }, + }, + }, } diff --git a/src/views/landing/support/hello-world.mjs b/src/views/landing/support/hello-world.mjs index f865b98a..c266b6c8 100644 --- a/src/views/landing/support/hello-world.mjs +++ b/src/views/landing/support/hello-world.mjs @@ -19,11 +19,11 @@ export const cloudformation = { { 'Effect': 'Allow', 'Principal': { - 'Service': 'lambda.amazonaws.com' + 'Service': 'lambda.amazonaws.com', }, - 'Action': 'sts:AssumeRole' - } - ] + 'Action': 'sts:AssumeRole', + }, + ], }, 'Policies': [ { @@ -36,12 +36,12 @@ export const cloudformation = { 'logs:CreateLogGroup', 'logs:CreateLogStream', 'logs:PutLogEvents', - 'logs:DescribeLogStreams' + 'logs:DescribeLogStreams', ], - 'Resource': 'arn:aws:logs:*:*:*' - } - ] - } + 'Resource': 'arn:aws:logs:*:*:*', + }, + ], + }, }, { 'PolicyName': 'ArcStaticBucketPolicy', @@ -54,7 +54,7 @@ export const cloudformation = { 's3:PutObject', 's3:PutObjectAcl', 's3:DeleteObject', - 's3:ListBucket' + 's3:ListBucket', ], 'Resource': [ { @@ -62,28 +62,28 @@ export const cloudformation = { 'arn:aws:s3:::${bukkit}', { 'bukkit': { - 'Ref': 'StaticBucket' - } - } - ] + 'Ref': 'StaticBucket', + }, + }, + ], }, { 'Fn::Sub': [ 'arn:aws:s3:::${bukkit}/*', { 'bukkit': { - 'Ref': 'StaticBucket' - } - } - ] - } - ] - } - ] - } - } - ] - } + 'Ref': 'StaticBucket', + }, + }, + ], + }, + ], + }, + ], + }, + }, + ], + }, }, 'StaticBucketParam': { 'Type': 'AWS::SSM::Parameter', @@ -93,14 +93,14 @@ export const cloudformation = { 'Fn::Sub': [ '/${AWS::StackName}/static/${key}', { - 'key': 'bucket' - } - ] + 'key': 'bucket', + }, + ], }, 'Value': { - 'Ref': 'StaticBucket' - } - } + 'Ref': 'StaticBucket', + }, + }, }, 'StaticFingerprintParam': { 'Type': 'AWS::SSM::Parameter', @@ -110,12 +110,12 @@ export const cloudformation = { 'Fn::Sub': [ '/${AWS::StackName}/static/${key}', { - 'key': 'fingerprint' - } - ] + 'key': 'fingerprint', + }, + ], }, - 'Value': 'false' - } + 'Value': 'false', + }, }, 'ParameterStorePolicy': { 'Type': 'AWS::IAM::Policy', @@ -128,49 +128,49 @@ export const cloudformation = { 'Effect': 'Allow', 'Action': [ 'ssm:GetParametersByPath', - 'ssm:GetParameter' + 'ssm:GetParameter', ], 'Resource': { 'Fn::Sub': [ 'arn:aws:ssm:${AWS::Region}:${AWS::AccountId}:parameter/${AWS::StackName}', - {} - ] - } + {}, + ], + }, }, { 'Effect': 'Allow', 'Action': [ 'ssm:GetParametersByPath', - 'ssm:GetParameter' + 'ssm:GetParameter', ], 'Resource': { 'Fn::Sub': [ 'arn:aws:ssm:${AWS::Region}:${AWS::AccountId}:parameter/${AWS::StackName}/*', - {} - ] - } + {}, + ], + }, }, { 'Effect': 'Allow', 'Action': [ 'ssm:GetParametersByPath', - 'ssm:GetParameter' + 'ssm:GetParameter', ], 'Resource': { 'Fn::Sub': [ 'arn:aws:ssm:${AWS::Region}:${AWS::AccountId}:parameter/${AWS::StackName}/*/*', - {} - ] - } - } - ] + {}, + ], + }, + }, + ], }, 'Roles': [ { - 'Ref': 'Role' - } - ] - } + 'Ref': 'Role', + }, + ], + }, }, 'HTTP': { 'Type': 'AWS::Serverless::HttpApi', @@ -180,8 +180,8 @@ export const cloudformation = { 'openapi': '3.0.1', 'info': { 'title': { - 'Ref': 'AWS::StackName' - } + 'Ref': 'AWS::StackName', + }, }, 'paths': { '/': { @@ -191,11 +191,11 @@ export const cloudformation = { 'type': 'aws_proxy', 'httpMethod': 'POST', 'uri': { - 'Fn::Sub': 'arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${GetIndexHTTPLambda.Arn}/invocations' + 'Fn::Sub': 'arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${GetIndexHTTPLambda.Arn}/invocations', }, - 'connectionType': 'INTERNET' - } - } + 'connectionType': 'INTERNET', + }, + }, }, '/_static/{proxy+}': { 'get': { @@ -208,19 +208,19 @@ export const cloudformation = { 'https://${bukkit}.s3.${AWS::Region}.amazonaws.com/{proxy}', { 'bukkit': { - 'Ref': 'StaticBucket' - } - } - ] + 'Ref': 'StaticBucket', + }, + }, + ], }, 'connectionType': 'INTERNET', - 'timeoutInMillis': 30000 - } - } - } - } - } - } + 'timeoutInMillis': 30000, + }, + }, + }, + }, + }, + }, }, 'GetIndexHTTPLambda': { 'Type': 'AWS::Serverless::Function', @@ -229,11 +229,11 @@ export const cloudformation = { 'CodeUri': '/var/task/src/http/get-index', 'Runtime': 'nodejs20.x', 'Architectures': [ - 'arm64' + 'arm64', ], 'MemorySize': 1152, 'EphemeralStorage': { - 'Size': 512 + 'Size': 512, }, 'Timeout': 5, 'Environment': { @@ -241,27 +241,27 @@ export const cloudformation = { 'ARC_APP_NAME': 'myapp', 'ARC_ENV': 'staging', 'ARC_ROLE': { - 'Ref': 'Role' + 'Ref': 'Role', }, 'ARC_SESSION_TABLE_NAME': 'jwe', 'ARC_STACK_NAME': { - 'Ref': 'AWS::StackName' + 'Ref': 'AWS::StackName', }, 'ARC_STATIC_BUCKET': { - 'Ref': 'StaticBucket' + 'Ref': 'StaticBucket', }, - 'ARC_STATIC_SPA': false - } + 'ARC_STATIC_SPA': false, + }, }, 'Role': { 'Fn::Sub': [ 'arn:aws:iam::${AWS::AccountId}:role/${roleName}', { 'roleName': { - 'Ref': 'Role' - } - } - ] + 'Ref': 'Role', + }, + }, + ], }, 'Events': { 'GetIndexHTTPEvent': { @@ -270,18 +270,18 @@ export const cloudformation = { 'Path': '/', 'Method': 'GET', 'ApiId': { - 'Ref': 'HTTP' - } - } - } - } + 'Ref': 'HTTP', + }, + }, + }, + }, }, 'ArcMetadata': { 'pragma': 'http', 'name': 'get /', 'method': 'get', - 'path': '/' - } + 'path': '/', + }, }, 'StaticBucket': { 'Type': 'AWS::S3::Bucket', @@ -289,34 +289,34 @@ export const cloudformation = { 'OwnershipControls': { 'Rules': [ { - 'ObjectOwnership': 'BucketOwnerEnforced' - } - ] + 'ObjectOwnership': 'BucketOwnerEnforced', + }, + ], }, 'WebsiteConfiguration': { 'IndexDocument': 'index.html', - 'ErrorDocument': '404.html' + 'ErrorDocument': '404.html', }, 'PublicAccessBlockConfiguration': { 'BlockPublicAcls': false, 'BlockPublicPolicy': false, 'IgnorePublicAcls': false, - 'RestrictPublicBuckets': false - } - } + 'RestrictPublicBuckets': false, + }, + }, }, 'StaticBucketPolicy': { 'Type': 'AWS::S3::BucketPolicy', 'Properties': { 'Bucket': { - 'Ref': 'StaticBucket' + 'Ref': 'StaticBucket', }, 'PolicyDocument': { 'Version': '2012-10-17', 'Statement': [ { 'Action': [ - 's3:GetObject' + 's3:GetObject', ], 'Effect': 'Allow', 'Principal': '*', @@ -326,18 +326,18 @@ export const cloudformation = { 'arn:aws:s3:::${bukkit}/*', { 'bukkit': { - 'Ref': 'StaticBucket' - } - } - ] - } + 'Ref': 'StaticBucket', + }, + }, + ], + }, ], - 'Sid': 'PublicReadGetObject' - } - ] - } - } - } + 'Sid': 'PublicReadGetObject', + }, + ], + }, + }, + }, }, 'Outputs': { 'API': { @@ -347,17 +347,17 @@ export const cloudformation = { 'https://${ApiId}.execute-api.${AWS::Region}.amazonaws.com', { 'ApiId': { - 'Ref': 'HTTP' - } - } - ] - } + 'Ref': 'HTTP', + }, + }, + ], + }, }, 'ApiId': { 'Description': 'API ID (ApiId)', 'Value': { - 'Ref': 'HTTP' - } + 'Ref': 'HTTP', + }, }, 'BucketURL': { 'Description': 'Bucket URL', @@ -366,11 +366,11 @@ export const cloudformation = { 'http://${bukkit}.s3-website-${AWS::Region}.amazonaws.com', { 'bukkit': { - 'Ref': 'StaticBucket' - } - } - ] - } - } - } + 'Ref': 'StaticBucket', + }, + }, + ], + }, + }, + }, } diff --git a/src/views/landing/support/kitchen-sink.mjs b/src/views/landing/support/kitchen-sink.mjs index 1a67c1cd..bfa2e56c 100644 --- a/src/views/landing/support/kitchen-sink.mjs +++ b/src/views/landing/support/kitchen-sink.mjs @@ -48,11 +48,11 @@ export const cloudformation = { { 'Effect': 'Allow', 'Principal': { - 'Service': 'lambda.amazonaws.com' + 'Service': 'lambda.amazonaws.com', }, - 'Action': 'sts:AssumeRole' - } - ] + 'Action': 'sts:AssumeRole', + }, + ], }, 'Policies': [ { @@ -65,12 +65,12 @@ export const cloudformation = { 'logs:CreateLogGroup', 'logs:CreateLogStream', 'logs:PutLogEvents', - 'logs:DescribeLogStreams' + 'logs:DescribeLogStreams', ], - 'Resource': 'arn:aws:logs:*:*:*' - } - ] - } + 'Resource': 'arn:aws:logs:*:*:*', + }, + ], + }, }, { 'PolicyName': 'ArcStaticBucketPolicy', @@ -83,7 +83,7 @@ export const cloudformation = { 's3:PutObject', 's3:PutObjectAcl', 's3:DeleteObject', - 's3:ListBucket' + 's3:ListBucket', ], 'Resource': [ { @@ -91,25 +91,25 @@ export const cloudformation = { 'arn:aws:s3:::${bukkit}', { 'bukkit': { - 'Ref': 'StaticBucket' - } - } - ] + 'Ref': 'StaticBucket', + }, + }, + ], }, { 'Fn::Sub': [ 'arn:aws:s3:::${bukkit}/*', { 'bukkit': { - 'Ref': 'StaticBucket' - } - } - ] - } - ] - } - ] - } + 'Ref': 'StaticBucket', + }, + }, + ], + }, + ], + }, + ], + }, }, { 'PolicyName': 'ArcDynamoPolicy', @@ -124,32 +124,32 @@ export const cloudformation = { 'arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${tablename}', { 'tablename': { - 'Ref': 'LikesTable' - } - } - ] + 'Ref': 'LikesTable', + }, + }, + ], }, { 'Fn::Sub': [ 'arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${tablename}/*', { 'tablename': { - 'Ref': 'LikesTable' - } - } - ] - } - ] + 'Ref': 'LikesTable', + }, + }, + ], + }, + ], }, { 'Effect': 'Deny', 'Action': 'dynamodb:DeleteTable', 'Resource': { - 'Fn::Sub': 'arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/*' - } - } - ] - } + 'Fn::Sub': 'arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/*', + }, + }, + ], + }, }, { 'PolicyName': 'ArcSimpleNotificationServicePolicy', @@ -158,20 +158,20 @@ export const cloudformation = { { 'Effect': 'Allow', 'Action': [ - 'sns:Publish' + 'sns:Publish', ], 'Resource': { 'Fn::Sub': [ 'arn:aws:sns:${AWS::Region}:${AWS::AccountId}:${AWS::StackName}*', - {} - ] - } - } - ] - } - } - ] - } + {}, + ], + }, + }, + ], + }, + }, + ], + }, }, 'LikesParam': { 'Type': 'AWS::SSM::Parameter', @@ -181,14 +181,14 @@ export const cloudformation = { 'Fn::Sub': [ '/${AWS::StackName}/tables/${tablename}', { - 'tablename': 'likes' - } - ] + 'tablename': 'likes', + }, + ], }, 'Value': { - 'Ref': 'LikesTable' - } - } + 'Ref': 'LikesTable', + }, + }, }, 'HitCounterEventTopicParam': { 'Type': 'AWS::SSM::Parameter', @@ -198,14 +198,14 @@ export const cloudformation = { 'Fn::Sub': [ '/${AWS::StackName}/events/${event}', { - 'event': 'hit-counter' - } - ] + 'event': 'hit-counter', + }, + ], }, 'Value': { - 'Ref': 'HitCounterEventTopic' - } - } + 'Ref': 'HitCounterEventTopic', + }, + }, }, 'StaticBucketParam': { 'Type': 'AWS::SSM::Parameter', @@ -215,14 +215,14 @@ export const cloudformation = { 'Fn::Sub': [ '/${AWS::StackName}/static/${key}', { - 'key': 'bucket' - } - ] + 'key': 'bucket', + }, + ], }, 'Value': { - 'Ref': 'StaticBucket' - } - } + 'Ref': 'StaticBucket', + }, + }, }, 'StaticFingerprintParam': { 'Type': 'AWS::SSM::Parameter', @@ -232,12 +232,12 @@ export const cloudformation = { 'Fn::Sub': [ '/${AWS::StackName}/static/${key}', { - 'key': 'fingerprint' - } - ] + 'key': 'fingerprint', + }, + ], }, - 'Value': 'true' - } + 'Value': 'true', + }, }, 'ParameterStorePolicy': { 'Type': 'AWS::IAM::Policy', @@ -250,49 +250,49 @@ export const cloudformation = { 'Effect': 'Allow', 'Action': [ 'ssm:GetParametersByPath', - 'ssm:GetParameter' + 'ssm:GetParameter', ], 'Resource': { 'Fn::Sub': [ 'arn:aws:ssm:${AWS::Region}:${AWS::AccountId}:parameter/${AWS::StackName}', - {} - ] - } + {}, + ], + }, }, { 'Effect': 'Allow', 'Action': [ 'ssm:GetParametersByPath', - 'ssm:GetParameter' + 'ssm:GetParameter', ], 'Resource': { 'Fn::Sub': [ 'arn:aws:ssm:${AWS::Region}:${AWS::AccountId}:parameter/${AWS::StackName}/*', - {} - ] - } + {}, + ], + }, }, { 'Effect': 'Allow', 'Action': [ 'ssm:GetParametersByPath', - 'ssm:GetParameter' + 'ssm:GetParameter', ], 'Resource': { 'Fn::Sub': [ 'arn:aws:ssm:${AWS::Region}:${AWS::AccountId}:parameter/${AWS::StackName}/*/*', - {} - ] - } - } - ] + {}, + ], + }, + }, + ], }, 'Roles': [ { - 'Ref': 'Role' - } - ] - } + 'Ref': 'Role', + }, + ], + }, }, 'HTTP': { 'Type': 'AWS::Serverless::HttpApi', @@ -302,8 +302,8 @@ export const cloudformation = { 'openapi': '3.0.1', 'info': { 'title': { - 'Ref': 'AWS::StackName' - } + 'Ref': 'AWS::StackName', + }, }, 'paths': { '/likes': { @@ -313,10 +313,10 @@ export const cloudformation = { 'type': 'aws_proxy', 'httpMethod': 'POST', 'uri': { - 'Fn::Sub': 'arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${GetLikesHTTPLambda.Arn}/invocations' + 'Fn::Sub': 'arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${GetLikesHTTPLambda.Arn}/invocations', }, - 'connectionType': 'INTERNET' - } + 'connectionType': 'INTERNET', + }, }, 'post': { 'x-amazon-apigateway-integration': { @@ -324,11 +324,11 @@ export const cloudformation = { 'type': 'aws_proxy', 'httpMethod': 'POST', 'uri': { - 'Fn::Sub': 'arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${PostLikesHTTPLambda.Arn}/invocations' + 'Fn::Sub': 'arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${PostLikesHTTPLambda.Arn}/invocations', }, - 'connectionType': 'INTERNET' - } - } + 'connectionType': 'INTERNET', + }, + }, }, '/': { 'get': { @@ -337,11 +337,11 @@ export const cloudformation = { 'type': 'aws_proxy', 'httpMethod': 'POST', 'uri': { - 'Fn::Sub': 'arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${GetIndexHTTPLambda.Arn}/invocations' + 'Fn::Sub': 'arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${GetIndexHTTPLambda.Arn}/invocations', }, - 'connectionType': 'INTERNET' - } - } + 'connectionType': 'INTERNET', + }, + }, }, '/_static/{proxy+}': { 'get': { @@ -354,19 +354,19 @@ export const cloudformation = { 'https://${bukkit}.s3.${AWS::Region}.amazonaws.com/{proxy}', { 'bukkit': { - 'Ref': 'StaticBucket' - } - } - ] + 'Ref': 'StaticBucket', + }, + }, + ], }, 'connectionType': 'INTERNET', - 'timeoutInMillis': 30000 - } - } - } - } - } - } + 'timeoutInMillis': 30000, + }, + }, + }, + }, + }, + }, }, 'GetLikesHTTPLambda': { 'Type': 'AWS::Serverless::Function', @@ -375,11 +375,11 @@ export const cloudformation = { 'CodeUri': '/var/task/src/http/get-likes', 'Runtime': 'nodejs20.x', 'Architectures': [ - 'arm64' + 'arm64', ], 'MemorySize': 1152, 'EphemeralStorage': { - 'Size': 512 + 'Size': 512, }, 'Timeout': 5, 'Environment': { @@ -387,32 +387,32 @@ export const cloudformation = { 'ARC_APP_NAME': 'hello', 'ARC_ENV': 'staging', 'ARC_ROLE': { - 'Ref': 'Role' + 'Ref': 'Role', }, 'ARC_SESSION_TABLE_NAME': 'jwe', 'ARC_STACK_NAME': { - 'Ref': 'AWS::StackName' + 'Ref': 'AWS::StackName', }, 'ARC_STATIC_BUCKET': { - 'Ref': 'StaticBucket' + 'Ref': 'StaticBucket', }, 'ARC_WSS_URL': { 'Fn::Sub': [ 'wss://${WS}.execute-api.${AWS::Region}.amazonaws.com/staging', - {} - ] - } - } + {}, + ], + }, + }, }, 'Role': { 'Fn::Sub': [ 'arn:aws:iam::${AWS::AccountId}:role/${roleName}', { 'roleName': { - 'Ref': 'Role' - } - } - ] + 'Ref': 'Role', + }, + }, + ], }, 'Events': { 'GetLikesHTTPEvent': { @@ -421,18 +421,18 @@ export const cloudformation = { 'Path': '/likes', 'Method': 'GET', 'ApiId': { - 'Ref': 'HTTP' - } - } - } - } + 'Ref': 'HTTP', + }, + }, + }, + }, }, 'ArcMetadata': { 'pragma': 'http', 'name': 'get /likes', 'method': 'get', - 'path': '/likes' - } + 'path': '/likes', + }, }, 'GetIndexHTTPLambda': { 'Type': 'AWS::Serverless::Function', @@ -441,11 +441,11 @@ export const cloudformation = { 'CodeUri': '/var/task/src/http/get-index', 'Runtime': 'nodejs20.x', 'Architectures': [ - 'arm64' + 'arm64', ], 'MemorySize': 1152, 'EphemeralStorage': { - 'Size': 512 + 'Size': 512, }, 'Timeout': 5, 'Environment': { @@ -453,33 +453,33 @@ export const cloudformation = { 'ARC_APP_NAME': 'hello', 'ARC_ENV': 'staging', 'ARC_ROLE': { - 'Ref': 'Role' + 'Ref': 'Role', }, 'ARC_SESSION_TABLE_NAME': 'jwe', 'ARC_STACK_NAME': { - 'Ref': 'AWS::StackName' + 'Ref': 'AWS::StackName', }, 'ARC_STATIC_BUCKET': { - 'Ref': 'StaticBucket' + 'Ref': 'StaticBucket', }, 'ARC_WSS_URL': { 'Fn::Sub': [ 'wss://${WS}.execute-api.${AWS::Region}.amazonaws.com/staging', - {} - ] + {}, + ], }, - 'ARC_STATIC_SPA': false - } + 'ARC_STATIC_SPA': false, + }, }, 'Role': { 'Fn::Sub': [ 'arn:aws:iam::${AWS::AccountId}:role/${roleName}', { 'roleName': { - 'Ref': 'Role' - } - } - ] + 'Ref': 'Role', + }, + }, + ], }, 'Events': { 'GetIndexHTTPEvent': { @@ -488,18 +488,18 @@ export const cloudformation = { 'Path': '/', 'Method': 'GET', 'ApiId': { - 'Ref': 'HTTP' - } - } - } - } + 'Ref': 'HTTP', + }, + }, + }, + }, }, 'ArcMetadata': { 'pragma': 'http', 'name': 'get /', 'method': 'get', - 'path': '/' - } + 'path': '/', + }, }, 'PostLikesHTTPLambda': { 'Type': 'AWS::Serverless::Function', @@ -508,11 +508,11 @@ export const cloudformation = { 'CodeUri': '/var/task/src/http/post-likes', 'Runtime': 'nodejs20.x', 'Architectures': [ - 'arm64' + 'arm64', ], 'MemorySize': 1152, 'EphemeralStorage': { - 'Size': 512 + 'Size': 512, }, 'Timeout': 5, 'Environment': { @@ -520,32 +520,32 @@ export const cloudformation = { 'ARC_APP_NAME': 'hello', 'ARC_ENV': 'staging', 'ARC_ROLE': { - 'Ref': 'Role' + 'Ref': 'Role', }, 'ARC_SESSION_TABLE_NAME': 'jwe', 'ARC_STACK_NAME': { - 'Ref': 'AWS::StackName' + 'Ref': 'AWS::StackName', }, 'ARC_STATIC_BUCKET': { - 'Ref': 'StaticBucket' + 'Ref': 'StaticBucket', }, 'ARC_WSS_URL': { 'Fn::Sub': [ 'wss://${WS}.execute-api.${AWS::Region}.amazonaws.com/staging', - {} - ] - } - } + {}, + ], + }, + }, }, 'Role': { 'Fn::Sub': [ 'arn:aws:iam::${AWS::AccountId}:role/${roleName}', { 'roleName': { - 'Ref': 'Role' - } - } - ] + 'Ref': 'Role', + }, + }, + ], }, 'Events': { 'PostLikesHTTPEvent': { @@ -554,18 +554,18 @@ export const cloudformation = { 'Path': '/likes', 'Method': 'POST', 'ApiId': { - 'Ref': 'HTTP' - } - } - } - } + 'Ref': 'HTTP', + }, + }, + }, + }, }, 'ArcMetadata': { 'pragma': 'http', 'name': 'post /likes', 'method': 'post', - 'path': '/likes' - } + 'path': '/likes', + }, }, 'LikesTable': { 'Type': 'AWS::DynamoDB::Table', @@ -573,18 +573,18 @@ export const cloudformation = { 'KeySchema': [ { 'AttributeName': 'likeID', - 'KeyType': 'HASH' - } + 'KeyType': 'HASH', + }, ], 'AttributeDefinitions': [ { 'AttributeName': 'likeID', - 'AttributeType': 'S' + 'AttributeType': 'S', }, { 'AttributeName': 'date', - 'AttributeType': 'S' - } + 'AttributeType': 'S', + }, ], 'BillingMode': 'PAY_PER_REQUEST', 'GlobalSecondaryIndexes': [ @@ -593,18 +593,18 @@ export const cloudformation = { 'KeySchema': [ { 'AttributeName': 'date', - 'KeyType': 'HASH' - } + 'KeyType': 'HASH', + }, ], 'Projection': { - 'ProjectionType': 'ALL' - } - } + 'ProjectionType': 'ALL', + }, + }, ], 'StreamSpecification': { - 'StreamViewType': 'NEW_AND_OLD_IMAGES' - } - } + 'StreamViewType': 'NEW_AND_OLD_IMAGES', + }, + }, }, 'HitCounterEventLambda': { 'Type': 'AWS::Serverless::Function', @@ -613,11 +613,11 @@ export const cloudformation = { 'CodeUri': '/var/task/src/events/hit-counter', 'Runtime': 'nodejs20.x', 'Architectures': [ - 'arm64' + 'arm64', ], 'MemorySize': 1152, 'EphemeralStorage': { - 'Size': 512 + 'Size': 512, }, 'Timeout': 5, 'Environment': { @@ -625,55 +625,55 @@ export const cloudformation = { 'ARC_APP_NAME': 'hello', 'ARC_ENV': 'staging', 'ARC_ROLE': { - 'Ref': 'Role' + 'Ref': 'Role', }, 'ARC_SESSION_TABLE_NAME': 'jwe', 'ARC_STACK_NAME': { - 'Ref': 'AWS::StackName' + 'Ref': 'AWS::StackName', }, 'ARC_STATIC_BUCKET': { - 'Ref': 'StaticBucket' + 'Ref': 'StaticBucket', }, 'ARC_WSS_URL': { 'Fn::Sub': [ 'wss://${WS}.execute-api.${AWS::Region}.amazonaws.com/staging', - {} - ] - } - } + {}, + ], + }, + }, }, 'Role': { 'Fn::Sub': [ 'arn:aws:iam::${AWS::AccountId}:role/${roleName}', { 'roleName': { - 'Ref': 'Role' - } - } - ] + 'Ref': 'Role', + }, + }, + ], }, 'Events': { 'HitCounterEvent': { 'Type': 'SNS', 'Properties': { 'Topic': { - 'Ref': 'HitCounterEventTopic' - } - } - } - } + 'Ref': 'HitCounterEventTopic', + }, + }, + }, + }, }, 'ArcMetadata': { 'pragma': 'events', - 'name': 'hit-counter' - } + 'name': 'hit-counter', + }, }, 'HitCounterEventTopic': { 'Type': 'AWS::SNS::Topic', 'Properties': { 'DisplayName': 'HitCounter', - 'Subscription': [] - } + 'Subscription': [], + }, }, 'DailyAffirmationScheduledLambda': { 'Type': 'AWS::Serverless::Function', @@ -682,11 +682,11 @@ export const cloudformation = { 'CodeUri': '/var/task/src/scheduled/daily-affirmation', 'Runtime': 'nodejs20.x', 'Architectures': [ - 'arm64' + 'arm64', ], 'MemorySize': 1152, 'EphemeralStorage': { - 'Size': 512 + 'Size': 512, }, 'Timeout': 5, 'Environment': { @@ -694,39 +694,39 @@ export const cloudformation = { 'ARC_APP_NAME': 'hello', 'ARC_ENV': 'staging', 'ARC_ROLE': { - 'Ref': 'Role' + 'Ref': 'Role', }, 'ARC_SESSION_TABLE_NAME': 'jwe', 'ARC_STACK_NAME': { - 'Ref': 'AWS::StackName' + 'Ref': 'AWS::StackName', }, 'ARC_STATIC_BUCKET': { - 'Ref': 'StaticBucket' + 'Ref': 'StaticBucket', }, 'ARC_WSS_URL': { 'Fn::Sub': [ 'wss://${WS}.execute-api.${AWS::Region}.amazonaws.com/staging', - {} - ] - } - } + {}, + ], + }, + }, }, 'Role': { 'Fn::Sub': [ 'arn:aws:iam::${AWS::AccountId}:role/${roleName}', { 'roleName': { - 'Ref': 'Role' - } - } - ] + 'Ref': 'Role', + }, + }, + ], }, - 'Events': {} + 'Events': {}, }, 'ArcMetadata': { 'pragma': 'scheduled', - 'name': 'daily-affirmation' - } + 'name': 'daily-affirmation', + }, }, 'DailyAffirmationScheduledEvent': { 'Type': 'AWS::Events::Rule', @@ -737,29 +737,29 @@ export const cloudformation = { 'Arn': { 'Fn::GetAtt': [ 'DailyAffirmationScheduledLambda', - 'Arn' - ] + 'Arn', + ], }, - 'Id': 'DailyAffirmationScheduledLambda' - } - ] - } + 'Id': 'DailyAffirmationScheduledLambda', + }, + ], + }, }, 'DailyAffirmationScheduledPermission': { 'Type': 'AWS::Lambda::Permission', 'Properties': { 'Action': 'lambda:InvokeFunction', 'FunctionName': { - 'Ref': 'DailyAffirmationScheduledLambda' + 'Ref': 'DailyAffirmationScheduledLambda', }, 'Principal': 'events.amazonaws.com', 'SourceArn': { 'Fn::GetAtt': [ 'DailyAffirmationScheduledEvent', - 'Arn' - ] - } - } + 'Arn', + ], + }, + }, }, 'StaticBucket': { 'Type': 'AWS::S3::Bucket', @@ -767,34 +767,34 @@ export const cloudformation = { 'OwnershipControls': { 'Rules': [ { - 'ObjectOwnership': 'BucketOwnerEnforced' - } - ] + 'ObjectOwnership': 'BucketOwnerEnforced', + }, + ], }, 'WebsiteConfiguration': { 'IndexDocument': 'index.html', - 'ErrorDocument': '404.html' + 'ErrorDocument': '404.html', }, 'PublicAccessBlockConfiguration': { 'BlockPublicAcls': false, 'BlockPublicPolicy': false, 'IgnorePublicAcls': false, - 'RestrictPublicBuckets': false - } - } + 'RestrictPublicBuckets': false, + }, + }, }, 'StaticBucketPolicy': { 'Type': 'AWS::S3::BucketPolicy', 'Properties': { 'Bucket': { - 'Ref': 'StaticBucket' + 'Ref': 'StaticBucket', }, 'PolicyDocument': { 'Version': '2012-10-17', 'Statement': [ { 'Action': [ - 's3:GetObject' + 's3:GetObject', ], 'Effect': 'Allow', 'Principal': '*', @@ -804,17 +804,17 @@ export const cloudformation = { 'arn:aws:s3:::${bukkit}/*', { 'bukkit': { - 'Ref': 'StaticBucket' - } - } - ] - } + 'Ref': 'StaticBucket', + }, + }, + ], + }, ], - 'Sid': 'PublicReadGetObject' - } - ] - } - } + 'Sid': 'PublicReadGetObject', + }, + ], + }, + }, }, 'LikesTableStreamLambda': { 'Type': 'AWS::Serverless::Function', @@ -823,11 +823,11 @@ export const cloudformation = { 'CodeUri': '/var/task/src/tables-streams/likes', 'Runtime': 'nodejs20.x', 'Architectures': [ - 'arm64' + 'arm64', ], 'MemorySize': 1152, 'EphemeralStorage': { - 'Size': 512 + 'Size': 512, }, 'Timeout': 5, 'Environment': { @@ -835,39 +835,39 @@ export const cloudformation = { 'ARC_APP_NAME': 'hello', 'ARC_ENV': 'staging', 'ARC_ROLE': { - 'Ref': 'Role' + 'Ref': 'Role', }, 'ARC_SESSION_TABLE_NAME': 'jwe', 'ARC_STACK_NAME': { - 'Ref': 'AWS::StackName' + 'Ref': 'AWS::StackName', }, 'ARC_STATIC_BUCKET': { - 'Ref': 'StaticBucket' + 'Ref': 'StaticBucket', }, 'ARC_WSS_URL': { 'Fn::Sub': [ 'wss://${WS}.execute-api.${AWS::Region}.amazonaws.com/staging', - {} - ] - } - } + {}, + ], + }, + }, }, 'Role': { 'Fn::Sub': [ 'arn:aws:iam::${AWS::AccountId}:role/${roleName}', { 'roleName': { - 'Ref': 'Role' - } - } - ] + 'Ref': 'Role', + }, + }, + ], }, - 'Events': {} + 'Events': {}, }, 'ArcMetadata': { 'pragma': 'tables-streams', - 'name': 'likes' - } + 'name': 'likes', + }, }, 'LikesTableStreamEvent': { 'Type': 'AWS::Lambda::EventSourceMapping', @@ -876,50 +876,50 @@ export const cloudformation = { 'EventSourceArn': { 'Fn::GetAtt': [ 'LikesTable', - 'StreamArn' - ] + 'StreamArn', + ], }, 'FunctionName': { 'Fn::GetAtt': [ 'LikesTableStreamLambda', - 'Arn' - ] + 'Arn', + ], }, - 'StartingPosition': 'TRIM_HORIZON' - } + 'StartingPosition': 'TRIM_HORIZON', + }, }, 'WS': { 'Type': 'AWS::ApiGatewayV2::Api', 'Properties': { 'Name': 'HelloWebsocketStaging', 'ProtocolType': 'WEBSOCKET', - 'RouteSelectionExpression': '$request.body.action' - } + 'RouteSelectionExpression': '$request.body.action', + }, }, 'WebsocketDeployment': { 'Type': 'AWS::ApiGatewayV2::Deployment', 'DependsOn': [ 'ConnectWSRoute', 'DefaultWSRoute', - 'DisconnectWSRoute' + 'DisconnectWSRoute', ], 'Properties': { 'ApiId': { - 'Ref': 'WS' - } - } + 'Ref': 'WS', + }, + }, }, 'WebsocketStage': { 'Type': 'AWS::ApiGatewayV2::Stage', 'Properties': { 'StageName': 'staging', 'DeploymentId': { - 'Ref': 'WebsocketDeployment' + 'Ref': 'WebsocketDeployment', }, 'ApiId': { - 'Ref': 'WS' - } - } + 'Ref': 'WS', + }, + }, }, 'WebSocketPolicy': { 'Type': 'AWS::IAM::Policy', @@ -932,7 +932,7 @@ export const cloudformation = { 'Effect': 'Allow', 'Action': [ 'execute-api:Invoke', - 'execute-api:ManageConnections' + 'execute-api:ManageConnections', ], 'Resource': [ { @@ -940,21 +940,21 @@ export const cloudformation = { 'arn:aws:execute-api:${AWS::Region}:*:${api}/*', { 'api': { - 'Ref': 'WS' - } - } - ] - } - ] - } - ] + 'Ref': 'WS', + }, + }, + ], + }, + ], + }, + ], }, 'Roles': [ { - 'Ref': 'Role' - } - ] - } + 'Ref': 'Role', + }, + ], + }, }, 'ActionWSLambda': { 'Type': 'AWS::Serverless::Function', @@ -963,11 +963,11 @@ export const cloudformation = { 'CodeUri': '/var/task/src/ws/action', 'Runtime': 'nodejs20.x', 'Architectures': [ - 'arm64' + 'arm64', ], 'MemorySize': 1152, 'EphemeralStorage': { - 'Size': 512 + 'Size': 512, }, 'Timeout': 5, 'Environment': { @@ -975,45 +975,45 @@ export const cloudformation = { 'ARC_APP_NAME': 'hello', 'ARC_ENV': 'staging', 'ARC_ROLE': { - 'Ref': 'Role' + 'Ref': 'Role', }, 'ARC_SESSION_TABLE_NAME': 'jwe', 'ARC_STACK_NAME': { - 'Ref': 'AWS::StackName' + 'Ref': 'AWS::StackName', }, 'ARC_STATIC_BUCKET': { - 'Ref': 'StaticBucket' + 'Ref': 'StaticBucket', }, 'ARC_WSS_URL': { 'Fn::Sub': [ 'wss://${WS}.execute-api.${AWS::Region}.amazonaws.com/staging', - {} - ] - } - } + {}, + ], + }, + }, }, 'Role': { 'Fn::Sub': [ 'arn:aws:iam::${AWS::AccountId}:role/${roleName}', { 'roleName': { - 'Ref': 'Role' - } - } - ] + 'Ref': 'Role', + }, + }, + ], }, - 'Events': {} + 'Events': {}, }, 'ArcMetadata': { 'pragma': 'ws', - 'name': 'action' - } + 'name': 'action', + }, }, 'ActionWSRoute': { 'Type': 'AWS::ApiGatewayV2::Route', 'Properties': { 'ApiId': { - 'Ref': 'WS' + 'Ref': 'WS', }, 'RouteKey': 'action', 'OperationName': 'ActionWSRoute', @@ -1023,41 +1023,41 @@ export const cloudformation = { [ 'integrations', { - 'Ref': 'ActionWSIntegration' - } - ] - ] - } - } + 'Ref': 'ActionWSIntegration', + }, + ], + ], + }, + }, }, 'ActionWSIntegration': { 'Type': 'AWS::ApiGatewayV2::Integration', 'Properties': { 'ApiId': { - 'Ref': 'WS' + 'Ref': 'WS', }, 'IntegrationType': 'AWS_PROXY', 'IntegrationUri': { 'Fn::Sub': [ 'arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${ActionWSLambda.Arn}/invocations', - {} - ] - } - } + {}, + ], + }, + }, }, 'ActionWSPermission': { 'Type': 'AWS::Lambda::Permission', 'DependsOn': [ 'WS', - 'ActionWSLambda' + 'ActionWSLambda', ], 'Properties': { 'Action': 'lambda:InvokeFunction', 'FunctionName': { - 'Ref': 'ActionWSLambda' + 'Ref': 'ActionWSLambda', }, - 'Principal': 'apigateway.amazonaws.com' - } + 'Principal': 'apigateway.amazonaws.com', + }, }, 'ConnectWSLambda': { 'Type': 'AWS::Serverless::Function', @@ -1066,11 +1066,11 @@ export const cloudformation = { 'CodeUri': '/var/task/src/ws/connect', 'Runtime': 'nodejs20.x', 'Architectures': [ - 'arm64' + 'arm64', ], 'MemorySize': 1152, 'EphemeralStorage': { - 'Size': 512 + 'Size': 512, }, 'Timeout': 5, 'Environment': { @@ -1078,45 +1078,45 @@ export const cloudformation = { 'ARC_APP_NAME': 'hello', 'ARC_ENV': 'staging', 'ARC_ROLE': { - 'Ref': 'Role' + 'Ref': 'Role', }, 'ARC_SESSION_TABLE_NAME': 'jwe', 'ARC_STACK_NAME': { - 'Ref': 'AWS::StackName' + 'Ref': 'AWS::StackName', }, 'ARC_STATIC_BUCKET': { - 'Ref': 'StaticBucket' + 'Ref': 'StaticBucket', }, 'ARC_WSS_URL': { 'Fn::Sub': [ 'wss://${WS}.execute-api.${AWS::Region}.amazonaws.com/staging', - {} - ] - } - } + {}, + ], + }, + }, }, 'Role': { 'Fn::Sub': [ 'arn:aws:iam::${AWS::AccountId}:role/${roleName}', { 'roleName': { - 'Ref': 'Role' - } - } - ] + 'Ref': 'Role', + }, + }, + ], }, - 'Events': {} + 'Events': {}, }, 'ArcMetadata': { 'pragma': 'ws', - 'name': 'connect' - } + 'name': 'connect', + }, }, 'ConnectWSRoute': { 'Type': 'AWS::ApiGatewayV2::Route', 'Properties': { 'ApiId': { - 'Ref': 'WS' + 'Ref': 'WS', }, 'RouteKey': '$connect', 'OperationName': 'ConnectWSRoute', @@ -1126,41 +1126,41 @@ export const cloudformation = { [ 'integrations', { - 'Ref': 'ConnectWSIntegration' - } - ] - ] - } - } + 'Ref': 'ConnectWSIntegration', + }, + ], + ], + }, + }, }, 'ConnectWSIntegration': { 'Type': 'AWS::ApiGatewayV2::Integration', 'Properties': { 'ApiId': { - 'Ref': 'WS' + 'Ref': 'WS', }, 'IntegrationType': 'AWS_PROXY', 'IntegrationUri': { 'Fn::Sub': [ 'arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${ConnectWSLambda.Arn}/invocations', - {} - ] - } - } + {}, + ], + }, + }, }, 'ConnectWSPermission': { 'Type': 'AWS::Lambda::Permission', 'DependsOn': [ 'WS', - 'ConnectWSLambda' + 'ConnectWSLambda', ], 'Properties': { 'Action': 'lambda:InvokeFunction', 'FunctionName': { - 'Ref': 'ConnectWSLambda' + 'Ref': 'ConnectWSLambda', }, - 'Principal': 'apigateway.amazonaws.com' - } + 'Principal': 'apigateway.amazonaws.com', + }, }, 'DefaultWSLambda': { 'Type': 'AWS::Serverless::Function', @@ -1169,11 +1169,11 @@ export const cloudformation = { 'CodeUri': '/var/task/src/ws/default', 'Runtime': 'nodejs20.x', 'Architectures': [ - 'arm64' + 'arm64', ], 'MemorySize': 1152, 'EphemeralStorage': { - 'Size': 512 + 'Size': 512, }, 'Timeout': 5, 'Environment': { @@ -1181,45 +1181,45 @@ export const cloudformation = { 'ARC_APP_NAME': 'hello', 'ARC_ENV': 'staging', 'ARC_ROLE': { - 'Ref': 'Role' + 'Ref': 'Role', }, 'ARC_SESSION_TABLE_NAME': 'jwe', 'ARC_STACK_NAME': { - 'Ref': 'AWS::StackName' + 'Ref': 'AWS::StackName', }, 'ARC_STATIC_BUCKET': { - 'Ref': 'StaticBucket' + 'Ref': 'StaticBucket', }, 'ARC_WSS_URL': { 'Fn::Sub': [ 'wss://${WS}.execute-api.${AWS::Region}.amazonaws.com/staging', - {} - ] - } - } + {}, + ], + }, + }, }, 'Role': { 'Fn::Sub': [ 'arn:aws:iam::${AWS::AccountId}:role/${roleName}', { 'roleName': { - 'Ref': 'Role' - } - } - ] + 'Ref': 'Role', + }, + }, + ], }, - 'Events': {} + 'Events': {}, }, 'ArcMetadata': { 'pragma': 'ws', - 'name': 'default' - } + 'name': 'default', + }, }, 'DefaultWSRoute': { 'Type': 'AWS::ApiGatewayV2::Route', 'Properties': { 'ApiId': { - 'Ref': 'WS' + 'Ref': 'WS', }, 'RouteKey': '$default', 'OperationName': 'DefaultWSRoute', @@ -1229,41 +1229,41 @@ export const cloudformation = { [ 'integrations', { - 'Ref': 'DefaultWSIntegration' - } - ] - ] - } - } + 'Ref': 'DefaultWSIntegration', + }, + ], + ], + }, + }, }, 'DefaultWSIntegration': { 'Type': 'AWS::ApiGatewayV2::Integration', 'Properties': { 'ApiId': { - 'Ref': 'WS' + 'Ref': 'WS', }, 'IntegrationType': 'AWS_PROXY', 'IntegrationUri': { 'Fn::Sub': [ 'arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${DefaultWSLambda.Arn}/invocations', - {} - ] - } - } + {}, + ], + }, + }, }, 'DefaultWSPermission': { 'Type': 'AWS::Lambda::Permission', 'DependsOn': [ 'WS', - 'DefaultWSLambda' + 'DefaultWSLambda', ], 'Properties': { 'Action': 'lambda:InvokeFunction', 'FunctionName': { - 'Ref': 'DefaultWSLambda' + 'Ref': 'DefaultWSLambda', }, - 'Principal': 'apigateway.amazonaws.com' - } + 'Principal': 'apigateway.amazonaws.com', + }, }, 'DisconnectWSLambda': { 'Type': 'AWS::Serverless::Function', @@ -1272,11 +1272,11 @@ export const cloudformation = { 'CodeUri': '/var/task/src/ws/disconnect', 'Runtime': 'nodejs20.x', 'Architectures': [ - 'arm64' + 'arm64', ], 'MemorySize': 1152, 'EphemeralStorage': { - 'Size': 512 + 'Size': 512, }, 'Timeout': 5, 'Environment': { @@ -1284,45 +1284,45 @@ export const cloudformation = { 'ARC_APP_NAME': 'hello', 'ARC_ENV': 'staging', 'ARC_ROLE': { - 'Ref': 'Role' + 'Ref': 'Role', }, 'ARC_SESSION_TABLE_NAME': 'jwe', 'ARC_STACK_NAME': { - 'Ref': 'AWS::StackName' + 'Ref': 'AWS::StackName', }, 'ARC_STATIC_BUCKET': { - 'Ref': 'StaticBucket' + 'Ref': 'StaticBucket', }, 'ARC_WSS_URL': { 'Fn::Sub': [ 'wss://${WS}.execute-api.${AWS::Region}.amazonaws.com/staging', - {} - ] - } - } + {}, + ], + }, + }, }, 'Role': { 'Fn::Sub': [ 'arn:aws:iam::${AWS::AccountId}:role/${roleName}', { 'roleName': { - 'Ref': 'Role' - } - } - ] + 'Ref': 'Role', + }, + }, + ], }, - 'Events': {} + 'Events': {}, }, 'ArcMetadata': { 'pragma': 'ws', - 'name': 'disconnect' - } + 'name': 'disconnect', + }, }, 'DisconnectWSRoute': { 'Type': 'AWS::ApiGatewayV2::Route', 'Properties': { 'ApiId': { - 'Ref': 'WS' + 'Ref': 'WS', }, 'RouteKey': '$disconnect', 'OperationName': 'DisconnectWSRoute', @@ -1332,42 +1332,42 @@ export const cloudformation = { [ 'integrations', { - 'Ref': 'DisconnectWSIntegration' - } - ] - ] - } - } + 'Ref': 'DisconnectWSIntegration', + }, + ], + ], + }, + }, }, 'DisconnectWSIntegration': { 'Type': 'AWS::ApiGatewayV2::Integration', 'Properties': { 'ApiId': { - 'Ref': 'WS' + 'Ref': 'WS', }, 'IntegrationType': 'AWS_PROXY', 'IntegrationUri': { 'Fn::Sub': [ 'arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${DisconnectWSLambda.Arn}/invocations', - {} - ] - } - } + {}, + ], + }, + }, }, 'DisconnectWSPermission': { 'Type': 'AWS::Lambda::Permission', 'DependsOn': [ 'WS', - 'DisconnectWSLambda' + 'DisconnectWSLambda', ], 'Properties': { 'Action': 'lambda:InvokeFunction', 'FunctionName': { - 'Ref': 'DisconnectWSLambda' + 'Ref': 'DisconnectWSLambda', }, - 'Principal': 'apigateway.amazonaws.com' - } - } + 'Principal': 'apigateway.amazonaws.com', + }, + }, }, 'Outputs': { 'API': { @@ -1377,23 +1377,23 @@ export const cloudformation = { 'https://${ApiId}.execute-api.${AWS::Region}.amazonaws.com', { 'ApiId': { - 'Ref': 'HTTP' - } - } - ] - } + 'Ref': 'HTTP', + }, + }, + ], + }, }, 'ApiId': { 'Description': 'API ID (ApiId)', 'Value': { - 'Ref': 'HTTP' - } + 'Ref': 'HTTP', + }, }, 'HitCounterEventTopic': { 'Description': 'An SNS Topic', 'Value': { - 'Ref': 'HitCounterEventTopic' - } + 'Ref': 'HitCounterEventTopic', + }, }, 'BucketURL': { 'Description': 'Bucket URL', @@ -1402,20 +1402,20 @@ export const cloudformation = { 'http://${bukkit}.s3-website-${AWS::Region}.amazonaws.com', { 'bukkit': { - 'Ref': 'StaticBucket' - } - } - ] - } + 'Ref': 'StaticBucket', + }, + }, + ], + }, }, 'WSS': { 'Description': 'WebSocket Endpoint', 'Value': { 'Fn::Sub': [ 'wss://${WS}.execute-api.${AWS::Region}.amazonaws.com/staging', - {} - ] - } - } - } + {}, + ], + }, + }, + }, } diff --git a/src/views/landing/support/render-examples.mjs b/src/views/landing/support/render-examples.mjs index 4af6ee83..2b08b75d 100644 --- a/src/views/landing/support/render-examples.mjs +++ b/src/views/landing/support/render-examples.mjs @@ -5,7 +5,7 @@ import { cloudformation as arcCodesCf, arc as arcCodesArc } from './arc-codes.mj import { cloudformation as kitchenSinkCf, arc as kitchenSinkArc } from './kitchen-sink.mjs' const hljs = { - classString: 'hljs text-1 p-2' + classString: 'hljs text-1 p-2', } const arcdown = new Arcdown({ hljs }) diff --git a/src/views/modules/document/html.mjs b/src/views/modules/document/html.mjs index 028d95bb..9ce8b706 100644 --- a/src/views/modules/document/html.mjs +++ b/src/views/modules/document/html.mjs @@ -18,14 +18,14 @@ export default function HTML (props = {}) { slug = '', state = {}, thirdparty = '', - title = '' + title = '', } = props const scriptTags = scripts && Array.isArray(props.scripts) ? scripts.map(src => Script({ src })).join('') : Script(scripts) - const stateTag = state && State(state) || '' + const stateTag = (state && State(state)) || '' return ` diff --git a/src/views/modules/helpers/list.mjs b/src/views/modules/helpers/list.mjs index cf2837ca..d78c1efb 100644 --- a/src/views/modules/helpers/list.mjs +++ b/src/views/modules/helpers/list.mjs @@ -3,7 +3,7 @@ export default function listFromObject ({ data = {}, map = {}, path = [], active const { list, item } = map const children = itemsFromObject({ data, list, item, depth, path, active }) return list({ - children + children, }) } diff --git a/src/views/modules/helpers/slugify.mjs b/src/views/modules/helpers/slugify.mjs index 55b4db6d..ab388859 100644 --- a/src/views/modules/helpers/slugify.mjs +++ b/src/views/modules/helpers/slugify.mjs @@ -3,6 +3,6 @@ import slugify from 'slugify' export default function slug (str = '') { return slugify(str, { lower: true, - remove: /[*+~()'"!?:@]/g + remove: /[*+~()'"!?:@]/g, }) }