fastscript 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/.github/workflows/ci.yml +17 -0
  2. package/CHANGELOG.md +5 -0
  3. package/Dockerfile +9 -0
  4. package/LICENSE +21 -0
  5. package/README.md +102 -0
  6. package/app/api/auth.js +10 -0
  7. package/app/api/hello.js +3 -0
  8. package/app/api/upload.js +9 -0
  9. package/app/api/webhook.js +10 -0
  10. package/app/db/migrations/001_init.js +6 -0
  11. package/app/db/seed.js +5 -0
  12. package/app/env.schema.js +6 -0
  13. package/app/middleware.fs +7 -0
  14. package/app/pages/404.fs +3 -0
  15. package/app/pages/_layout.fs +17 -0
  16. package/app/pages/benchmarks.fs +15 -0
  17. package/app/pages/docs/index.fs +16 -0
  18. package/app/pages/index.fs +22 -0
  19. package/app/pages/private.fs +12 -0
  20. package/app/pages/showcase.fs +14 -0
  21. package/app/styles.css +14 -0
  22. package/docs/AI_CONTEXT_PACK_V1.md +25 -0
  23. package/docs/DEPLOY_GUIDE.md +14 -0
  24. package/docs/INCIDENT_PLAYBOOK.md +18 -0
  25. package/docs/INTEROP_RULES.md +7 -0
  26. package/docs/PLUGIN_API_CONTRACT.md +22 -0
  27. package/ecosystem.config.cjs +1 -0
  28. package/examples/fullstack/README.md +10 -0
  29. package/examples/fullstack/app/api/orders.js +8 -0
  30. package/examples/fullstack/app/db/migrations/001_init.js +3 -0
  31. package/examples/fullstack/app/db/seed.js +3 -0
  32. package/examples/fullstack/app/jobs/send-order-email.js +4 -0
  33. package/examples/fullstack/app/pages/_layout.fs +1 -0
  34. package/examples/fullstack/app/pages/index.fs +3 -0
  35. package/examples/startup-mvp/README.md +8 -0
  36. package/examples/startup-mvp/app/api/cart.js +9 -0
  37. package/examples/startup-mvp/app/api/checkout.js +8 -0
  38. package/examples/startup-mvp/app/db/migrations/001_products.js +6 -0
  39. package/examples/startup-mvp/app/jobs/send-receipt.js +4 -0
  40. package/examples/startup-mvp/app/pages/_layout.fs +3 -0
  41. package/examples/startup-mvp/app/pages/dashboard/index.fs +9 -0
  42. package/examples/startup-mvp/app/pages/index.fs +18 -0
  43. package/package.json +50 -0
  44. package/scripts/bench-report.mjs +36 -0
  45. package/scripts/release.mjs +21 -0
  46. package/scripts/smoke-dev.mjs +78 -0
  47. package/scripts/smoke-start.mjs +41 -0
  48. package/scripts/test-auth.mjs +26 -0
  49. package/scripts/test-db.mjs +31 -0
  50. package/scripts/test-jobs.mjs +15 -0
  51. package/scripts/test-middleware.mjs +37 -0
  52. package/scripts/test-roundtrip.mjs +44 -0
  53. package/scripts/test-validation.mjs +17 -0
  54. package/scripts/test-webhook-storage.mjs +22 -0
  55. package/spec/FASTSCRIPT_1000_BUILD_LIST.md +1090 -0
  56. package/src/auth-flows.mjs +29 -0
  57. package/src/auth.mjs +115 -0
  58. package/src/bench.mjs +46 -0
  59. package/src/build.mjs +222 -0
  60. package/src/cache.mjs +58 -0
  61. package/src/check.mjs +22 -0
  62. package/src/cli.mjs +71 -0
  63. package/src/compat.mjs +122 -0
  64. package/src/create.mjs +190 -0
  65. package/src/db-cli.mjs +45 -0
  66. package/src/db-postgres.mjs +40 -0
  67. package/src/db.mjs +103 -0
  68. package/src/deploy.mjs +65 -0
  69. package/src/dev.mjs +5 -0
  70. package/src/env.mjs +89 -0
  71. package/src/export.mjs +83 -0
  72. package/src/fs-normalize.mjs +100 -0
  73. package/src/interop.mjs +16 -0
  74. package/src/jobs.mjs +127 -0
  75. package/src/logger.mjs +27 -0
  76. package/src/middleware.mjs +14 -0
  77. package/src/migrate.mjs +81 -0
  78. package/src/observability.mjs +21 -0
  79. package/src/security.mjs +55 -0
  80. package/src/server-runtime.mjs +339 -0
  81. package/src/start.mjs +10 -0
  82. package/src/storage.mjs +56 -0
  83. package/src/validate.mjs +18 -0
  84. package/src/validation.mjs +79 -0
  85. package/src/webhook.mjs +71 -0
  86. package/src/worker.mjs +5 -0
  87. package/vercel.json +15 -0
  88. package/vscode/fastscript-language/README.md +12 -0
  89. package/vscode/fastscript-language/extension.js +24 -0
  90. package/vscode/fastscript-language/language-configuration.json +6 -0
  91. package/vscode/fastscript-language/lsp/server.cjs +27 -0
  92. package/vscode/fastscript-language/lsp/smoke-test.cjs +1 -0
  93. package/vscode/fastscript-language/package.json +36 -0
  94. package/vscode/fastscript-language/snippets/fastscript.code-snippets +24 -0
  95. package/vscode/fastscript-language/syntaxes/fastscript.tmLanguage.json +21 -0
  96. package/wrangler.toml +5 -0
@@ -0,0 +1,36 @@
1
+ {
2
+ "name": "fastscript-language",
3
+ "displayName": "FastScript Language",
4
+ "description": "Syntax and language support for FastScript (.fs)",
5
+ "version": "0.1.0",
6
+ "publisher": "lakesbim-velox",
7
+ "engines": { "vscode": "^1.90.0" },
8
+ "categories": ["Programming Languages"],
9
+ "activationEvents": ["onLanguage:fastscript"],
10
+ "main": "./extension.js",
11
+ "contributes": {
12
+ "languages": [{
13
+ "id": "fastscript",
14
+ "aliases": ["FastScript", "fastscript"],
15
+ "extensions": [".fs"],
16
+ "configuration": "./language-configuration.json"
17
+ }],
18
+ "grammars": [{
19
+ "language": "fastscript",
20
+ "scopeName": "source.fastscript",
21
+ "path": "./syntaxes/fastscript.tmLanguage.json"
22
+ }],
23
+ "snippets": [{
24
+ "language": "fastscript",
25
+ "path": "./snippets/fastscript.code-snippets"
26
+ }]
27
+ },
28
+ "scripts": {
29
+ "test:lsp": "node ./lsp/smoke-test.cjs"
30
+ },
31
+ "devDependencies": {
32
+ "vscode-languageclient": "^9.0.1",
33
+ "vscode-languageserver": "^9.0.1",
34
+ "vscode-languageserver-textdocument": "^1.0.11"
35
+ }
36
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "FastScript Component": {
3
+ "prefix": "fcomp",
4
+ "body": [
5
+ "export default function ${1:Component}(${2:ctx}) {",
6
+ " return `",
7
+ " <section>${3}</section>",
8
+ " `;",
9
+ "}"
10
+ ],
11
+ "description": "FastScript component"
12
+ },
13
+ "FastScript API": {
14
+ "prefix": "fapi",
15
+ "body": [
16
+ "export const schemas = { POST: { ${1:name}: \"string\" } };",
17
+ "export async function POST(ctx) {",
18
+ " const body = await ctx.input.validateBody(schemas.POST);",
19
+ " return ctx.helpers.json({ ok: true, body });",
20
+ "}"
21
+ ],
22
+ "description": "FastScript API route"
23
+ }
24
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
3
+ "name": "FastScript",
4
+ "scopeName": "source.fastscript",
5
+ "patterns": [
6
+ { "include": "#comments" },
7
+ { "include": "#strings" },
8
+ { "include": "#keywords" },
9
+ { "include": "#numbers" },
10
+ { "include": "#operators" },
11
+ { "include": "#functions" }
12
+ ],
13
+ "repository": {
14
+ "comments": { "patterns": [{ "name": "comment.line.double-slash.fastscript", "match": "//.*$" }] },
15
+ "strings": { "patterns": [{ "name": "string.quoted.double.fastscript", "begin": "\"", "end": "\"", "patterns": [{ "match": "\\\\.", "name": "constant.character.escape.fastscript" }] }] },
16
+ "keywords": { "patterns": [{ "name": "keyword.control.fastscript", "match": "\\b(export|default|function|return|if|else|for|while|async|await|import|from|state|fn)\\b" }, { "name": "keyword.other.reactive.fastscript", "match": "~[A-Za-z_$][\\w$]*" }] },
17
+ "numbers": { "patterns": [{ "name": "constant.numeric.fastscript", "match": "\\b\\d+(?:\\.\\d+)?\\b" }] },
18
+ "operators": { "patterns": [{ "name": "keyword.operator.fastscript", "match": "[+\\-*/%=!<>|&]+" }] },
19
+ "functions": { "patterns": [{ "name": "entity.name.function.fastscript", "match": "\\b([A-Za-z_$][\\w$]*)\\s*(?=\\()" }] }
20
+ }
21
+ }
package/wrangler.toml ADDED
@@ -0,0 +1,5 @@
1
+ name = "fastscript-app"
2
+ main = "dist/worker.js"
3
+ compatibility_date = "2026-01-01"
4
+ [assets]
5
+ directory = "dist"