fastscript 0.1.0 → 1.0.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.
- package/CHANGELOG.md +9 -2
- package/README.md +15 -0
- package/package.json +19 -5
- package/src/build.mjs +15 -3
- package/src/compat.mjs +10 -2
- package/src/create.mjs +6 -6
- package/src/db-cli.mjs +9 -13
- package/src/fs-normalize.mjs +215 -7
- package/src/language-spec.mjs +58 -0
- package/src/module-loader.mjs +47 -0
- package/.github/workflows/ci.yml +0 -17
- package/Dockerfile +0 -9
- package/app/api/auth.js +0 -10
- package/app/api/hello.js +0 -3
- package/app/api/upload.js +0 -9
- package/app/api/webhook.js +0 -10
- package/app/db/migrations/001_init.js +0 -6
- package/app/db/seed.js +0 -5
- package/app/env.schema.js +0 -6
- package/app/middleware.fs +0 -7
- package/app/pages/404.fs +0 -3
- package/app/pages/_layout.fs +0 -17
- package/app/pages/benchmarks.fs +0 -15
- package/app/pages/docs/index.fs +0 -16
- package/app/pages/index.fs +0 -22
- package/app/pages/private.fs +0 -12
- package/app/pages/showcase.fs +0 -14
- package/app/styles.css +0 -14
- package/docs/AI_CONTEXT_PACK_V1.md +0 -25
- package/docs/DEPLOY_GUIDE.md +0 -14
- package/docs/INCIDENT_PLAYBOOK.md +0 -18
- package/docs/INTEROP_RULES.md +0 -7
- package/docs/PLUGIN_API_CONTRACT.md +0 -22
- package/ecosystem.config.cjs +0 -1
- package/examples/fullstack/README.md +0 -10
- package/examples/fullstack/app/api/orders.js +0 -8
- package/examples/fullstack/app/db/migrations/001_init.js +0 -3
- package/examples/fullstack/app/db/seed.js +0 -3
- package/examples/fullstack/app/jobs/send-order-email.js +0 -4
- package/examples/fullstack/app/pages/_layout.fs +0 -1
- package/examples/fullstack/app/pages/index.fs +0 -3
- package/examples/startup-mvp/README.md +0 -8
- package/examples/startup-mvp/app/api/cart.js +0 -9
- package/examples/startup-mvp/app/api/checkout.js +0 -8
- package/examples/startup-mvp/app/db/migrations/001_products.js +0 -6
- package/examples/startup-mvp/app/jobs/send-receipt.js +0 -4
- package/examples/startup-mvp/app/pages/_layout.fs +0 -3
- package/examples/startup-mvp/app/pages/dashboard/index.fs +0 -9
- package/examples/startup-mvp/app/pages/index.fs +0 -18
- package/scripts/bench-report.mjs +0 -36
- package/scripts/release.mjs +0 -21
- package/scripts/smoke-dev.mjs +0 -78
- package/scripts/smoke-start.mjs +0 -41
- package/scripts/test-auth.mjs +0 -26
- package/scripts/test-db.mjs +0 -31
- package/scripts/test-jobs.mjs +0 -15
- package/scripts/test-middleware.mjs +0 -37
- package/scripts/test-roundtrip.mjs +0 -44
- package/scripts/test-validation.mjs +0 -17
- package/scripts/test-webhook-storage.mjs +0 -22
- package/spec/FASTSCRIPT_1000_BUILD_LIST.md +0 -1090
- package/vercel.json +0 -15
- package/vscode/fastscript-language/README.md +0 -12
- package/vscode/fastscript-language/extension.js +0 -24
- package/vscode/fastscript-language/language-configuration.json +0 -6
- package/vscode/fastscript-language/lsp/server.cjs +0 -27
- package/vscode/fastscript-language/lsp/smoke-test.cjs +0 -1
- package/vscode/fastscript-language/package.json +0 -36
- package/vscode/fastscript-language/snippets/fastscript.code-snippets +0 -24
- package/vscode/fastscript-language/syntaxes/fastscript.tmLanguage.json +0 -21
- package/wrangler.toml +0 -5
package/vercel.json
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
const path = require('node:path');
|
|
2
|
-
const vscode = require('vscode');
|
|
3
|
-
const { LanguageClient, TransportKind } = require('vscode-languageclient/node');
|
|
4
|
-
|
|
5
|
-
let client;
|
|
6
|
-
|
|
7
|
-
function activate(context) {
|
|
8
|
-
const serverModule = context.asAbsolutePath(path.join('lsp', 'server.cjs'));
|
|
9
|
-
const serverOptions = { run: { module: serverModule, transport: TransportKind.ipc }, debug: { module: serverModule, transport: TransportKind.ipc } };
|
|
10
|
-
const clientOptions = { documentSelector: [{ scheme: 'file', language: 'fastscript' }] };
|
|
11
|
-
client = new LanguageClient('fastscript-lsp', 'FastScript Language Server', serverOptions, clientOptions);
|
|
12
|
-
context.subscriptions.push(client.start());
|
|
13
|
-
vscode.languages.setLanguageConfiguration('fastscript', {
|
|
14
|
-
comments: { lineComment: '//' },
|
|
15
|
-
brackets: [['{', '}'], ['[', ']'], ['(', ')']],
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
function deactivate() {
|
|
20
|
-
if (!client) return undefined;
|
|
21
|
-
return client.stop();
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
module.exports = { activate, deactivate };
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"comments": { "lineComment": "//", "blockComment": ["/*", "*/"] },
|
|
3
|
-
"brackets": [["{", "}"], ["[", "]"], ["(", ")"]],
|
|
4
|
-
"autoClosingPairs": [{"open":"{","close":"}"},{"open":"[","close":"]"},{"open":"(","close":")"},{"open":"\"","close":"\""},{"open":"'","close":"'"}],
|
|
5
|
-
"surroundingPairs": [["{", "}"], ["[", "]"], ["(", ")"], ["\"", "\""], ["'", "'"]]
|
|
6
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
const { createConnection, ProposedFeatures, TextDocuments, DiagnosticSeverity } = require('vscode-languageserver/node');
|
|
2
|
-
const { TextDocument } = require('vscode-languageserver-textdocument');
|
|
3
|
-
|
|
4
|
-
const connection = createConnection(ProposedFeatures.all);
|
|
5
|
-
const documents = new TextDocuments(TextDocument);
|
|
6
|
-
|
|
7
|
-
connection.onInitialize(() => ({ capabilities: { textDocumentSync: documents.syncKind } }));
|
|
8
|
-
|
|
9
|
-
documents.onDidChangeContent((change) => {
|
|
10
|
-
const text = change.document.getText();
|
|
11
|
-
const diagnostics = [];
|
|
12
|
-
const lines = text.split(/\r?\n/);
|
|
13
|
-
lines.forEach((line, i) => {
|
|
14
|
-
if (line.includes('TODO_ERROR')) {
|
|
15
|
-
diagnostics.push({
|
|
16
|
-
severity: DiagnosticSeverity.Error,
|
|
17
|
-
range: { start: { line: i, character: 0 }, end: { line: i, character: line.length } },
|
|
18
|
-
message: 'Remove TODO_ERROR token',
|
|
19
|
-
source: 'fastscript-lsp',
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
connection.sendDiagnostics({ uri: change.document.uri, diagnostics });
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
documents.listen(connection);
|
|
27
|
-
connection.listen();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
console.log('fastscript lsp smoke test placeholder: install deps in vscode/fastscript-language first');
|
|
@@ -1,36 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
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
|
-
}
|