fazer-lang 2.1.2 → 2.3.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/LICENSE +21 -0
- package/README.md +28 -220
- package/docs/README.md +26 -0
- package/docs/examples.md +60 -0
- package/docs/getting-started.md +46 -0
- package/docs/stdlib.md +139 -0
- package/docs/syntax.md +86 -0
- package/fazer.js +475 -86
- package/package.json +22 -12
- package/tools/announce.fz +48 -0
- package/apply_icon.js +0 -28
- package/apply_icon_robust.js +0 -51
- package/bin/fazer.exe +0 -0
- package/package.json.bak +0 -44
- package/standalone.bundled.js +0 -12910
- package/standalone.js +0 -186
- package/test.fz +0 -92
package/package.json
CHANGED
|
@@ -1,23 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fazer-lang",
|
|
3
|
-
"version": "2.
|
|
4
|
-
"description": "Fazer —
|
|
3
|
+
"version": "2.3.0",
|
|
4
|
+
"description": "Fazer — The ultimate automation language. Batteries-included: HTTP Server, System Exec, Clipboard, Discord, Crypto, and Pipe Operators (->).",
|
|
5
5
|
"main": "fazer.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"fazer": "fazer.js"
|
|
8
8
|
},
|
|
9
|
+
"files": [
|
|
10
|
+
"fazer.js",
|
|
11
|
+
"README.md",
|
|
12
|
+
"LICENSE",
|
|
13
|
+
"docs/",
|
|
14
|
+
"tools/"
|
|
15
|
+
],
|
|
9
16
|
"dependencies": {
|
|
10
|
-
"chevrotain": "^11.0.3"
|
|
11
|
-
|
|
12
|
-
"devDependencies": {
|
|
13
|
-
"esbuild": "^0.27.2",
|
|
14
|
-
"pkg": "^5.8.1",
|
|
15
|
-
"rcedit": "^5.0.2"
|
|
17
|
+
"chevrotain": "^11.0.3",
|
|
18
|
+
"ws": "^8.18.0"
|
|
16
19
|
},
|
|
20
|
+
"devDependencies": {},
|
|
17
21
|
"scripts": {
|
|
18
22
|
"start": "node fazer.js",
|
|
19
|
-
"test": "node fazer.js
|
|
20
|
-
"build": "pkg fazer.js --targets node18-win-x64,node18-linux-x64 --output dist/fazer"
|
|
23
|
+
"test": "node fazer.js --version"
|
|
21
24
|
},
|
|
22
25
|
"keywords": [
|
|
23
26
|
"fazer",
|
|
@@ -27,12 +30,19 @@
|
|
|
27
30
|
"pipe-operator",
|
|
28
31
|
"functional",
|
|
29
32
|
"secure",
|
|
30
|
-
"automation"
|
|
33
|
+
"automation",
|
|
34
|
+
"discord-bot",
|
|
35
|
+
"http-server",
|
|
36
|
+
"system-automation"
|
|
31
37
|
],
|
|
32
38
|
"author": "Fazer Corp",
|
|
33
39
|
"license": "MIT",
|
|
34
40
|
"repository": {
|
|
35
41
|
"type": "git",
|
|
36
42
|
"url": "https://github.com/viced/fazer-lang.git"
|
|
37
|
-
}
|
|
43
|
+
},
|
|
44
|
+
"bugs": {
|
|
45
|
+
"url": "https://github.com/viced/fazer-lang/issues"
|
|
46
|
+
},
|
|
47
|
+
"homepage": "https://github.com/viced/fazer-lang#readme"
|
|
38
48
|
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// tools/announce.fz
|
|
2
|
+
webhook := "https://canary.discord.com/api/webhooks/1463728147202838652/vEd4MqqtYmAFg15GKX3FBxLYS1XImycormdOMwTa3Dbwcm6r8lYI3dfIWlZiLH2Dxq9e"
|
|
3
|
+
|
|
4
|
+
fn send(title, desc, color) ->
|
|
5
|
+
payload := {
|
|
6
|
+
"embeds": [{
|
|
7
|
+
"title": title,
|
|
8
|
+
"description": desc,
|
|
9
|
+
"color": int(color),
|
|
10
|
+
"footer": { "text": "Fazer Automation System" }
|
|
11
|
+
}]
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
println("Envoi vers Discord...")
|
|
15
|
+
res := fetch(webhook, {
|
|
16
|
+
"method": "POST",
|
|
17
|
+
"headers": { "Content-Type": "application/json" },
|
|
18
|
+
"body": json(payload)
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
case res.status >= 200 and res.status < 300
|
|
22
|
+
true -> println("Succès !") end
|
|
23
|
+
else -> println("Erreur " + res.status + ": " + res.body) end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
a := argv()
|
|
28
|
+
start := 1
|
|
29
|
+
|
|
30
|
+
case len(a) <= start
|
|
31
|
+
true -> println("Usage: fazer tools/announce.fz \"Titre\" \"Description\" [color]") end
|
|
32
|
+
else ->
|
|
33
|
+
title := a[start]
|
|
34
|
+
desc := ""
|
|
35
|
+
case len(a) > start + 1
|
|
36
|
+
true -> desc := a[start + 1] end
|
|
37
|
+
else -> end
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
color := 5763719
|
|
41
|
+
case len(a) > start + 2
|
|
42
|
+
true -> color := a[start + 2] end
|
|
43
|
+
else -> end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
send(title, desc, color)
|
|
47
|
+
end
|
|
48
|
+
end
|
package/apply_icon.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
const { rcedit } = require('rcedit');
|
|
2
|
-
const path = require('path');
|
|
3
|
-
|
|
4
|
-
async function main() {
|
|
5
|
-
const exePath = path.resolve(__dirname, '../FzEncrypt.exe');
|
|
6
|
-
const iconPath = path.resolve(__dirname, '../fazer.ico');
|
|
7
|
-
|
|
8
|
-
console.log(`Applying icon to: ${exePath}`);
|
|
9
|
-
console.log(`Using icon: ${iconPath}`);
|
|
10
|
-
|
|
11
|
-
try {
|
|
12
|
-
await rcedit(exePath, {
|
|
13
|
-
icon: iconPath,
|
|
14
|
-
'version-string': {
|
|
15
|
-
'CompanyName': 'Fazer Corp',
|
|
16
|
-
'FileDescription': 'Fz Encrypt',
|
|
17
|
-
'ProductName': 'Fz Encrypt',
|
|
18
|
-
'LegalCopyright': 'Copyright (c) 2026'
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
console.log('Icon applied successfully!');
|
|
22
|
-
} catch (error) {
|
|
23
|
-
console.error('Error applying icon:', error);
|
|
24
|
-
process.exit(1);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
main();
|
package/apply_icon_robust.js
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
const { rcedit } = require('rcedit');
|
|
2
|
-
const path = require('path');
|
|
3
|
-
const fs = require('fs');
|
|
4
|
-
|
|
5
|
-
async function main() {
|
|
6
|
-
const exePath = path.resolve(__dirname, '../FzEncrypt.exe');
|
|
7
|
-
const tempExePath = path.resolve(__dirname, '../FzEncrypt-temp.exe');
|
|
8
|
-
const iconPath = path.resolve(__dirname, '../fazer.ico');
|
|
9
|
-
|
|
10
|
-
console.log(`Applying icon...`);
|
|
11
|
-
|
|
12
|
-
try {
|
|
13
|
-
// 1. Copy to temp to avoid lock issues
|
|
14
|
-
fs.copyFileSync(exePath, tempExePath);
|
|
15
|
-
|
|
16
|
-
// 2. Apply icon to temp
|
|
17
|
-
await rcedit(tempExePath, {
|
|
18
|
-
icon: iconPath,
|
|
19
|
-
'version-string': {
|
|
20
|
-
'CompanyName': 'Fazer Corp',
|
|
21
|
-
'FileDescription': 'Fz Encrypt',
|
|
22
|
-
'ProductName': 'Fz Encrypt',
|
|
23
|
-
'LegalCopyright': 'Copyright (c) 2026'
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
// 3. Replace original
|
|
28
|
-
// Retry a few times if locked
|
|
29
|
-
let retries = 5;
|
|
30
|
-
while (retries > 0) {
|
|
31
|
-
try {
|
|
32
|
-
fs.renameSync(tempExePath, exePath);
|
|
33
|
-
break;
|
|
34
|
-
} catch (e) {
|
|
35
|
-
retries--;
|
|
36
|
-
if (retries === 0) throw e;
|
|
37
|
-
console.log("Fichier verrouillé, nouvelle tentative dans 1s...");
|
|
38
|
-
await new Promise(r => setTimeout(r, 1000));
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
console.log('Icon applied successfully!');
|
|
43
|
-
} catch (error) {
|
|
44
|
-
console.error('Error applying icon:', error);
|
|
45
|
-
// If temp exists, try to clean up
|
|
46
|
-
try { if (fs.existsSync(tempExePath)) fs.unlinkSync(tempExePath); } catch(e) {}
|
|
47
|
-
process.exit(1);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
main();
|
package/bin/fazer.exe
DELETED
|
Binary file
|
package/package.json.bak
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "fazer-lang",
|
|
3
|
-
"version": "0.1.0",
|
|
4
|
-
"description": "Fazer Language – Un langage de programmation.",
|
|
5
|
-
"main": "fazer.js",
|
|
6
|
-
"bin": {
|
|
7
|
-
"fazer": "fazer.js"
|
|
8
|
-
},
|
|
9
|
-
"dependencies": {
|
|
10
|
-
"discord.js": "^14.14.1",
|
|
11
|
-
"chevrotain": "^11.0.3"
|
|
12
|
-
},
|
|
13
|
-
"devDependencies": {
|
|
14
|
-
"pkg": "^5.8.1"
|
|
15
|
-
},
|
|
16
|
-
"scripts": {
|
|
17
|
-
"start": "node fazer.js",
|
|
18
|
-
"build": "pkg fazer.js -t node18-win-x64 -o bin/fazer.exe"
|
|
19
|
-
},
|
|
20
|
-
"keywords": [
|
|
21
|
-
"fazer",
|
|
22
|
-
"programming-language",
|
|
23
|
-
"street-script",
|
|
24
|
-
"discord-bot",
|
|
25
|
-
"simulation",
|
|
26
|
-
"risk-based"
|
|
27
|
-
],
|
|
28
|
-
"author": "hm (Fazer City)",
|
|
29
|
-
"license": "MIT",
|
|
30
|
-
"files": [
|
|
31
|
-
"fazer.js",
|
|
32
|
-
"bin/",
|
|
33
|
-
"README.md",
|
|
34
|
-
"logo.png"
|
|
35
|
-
],
|
|
36
|
-
"repository": {
|
|
37
|
-
"type": "git",
|
|
38
|
-
"url": "git+https://github.com/hmj34/fazer-lang.git"
|
|
39
|
-
},
|
|
40
|
-
"bugs": {
|
|
41
|
-
"url": "https://github.com/hmj34/fazer-lang/issues"
|
|
42
|
-
},
|
|
43
|
-
"homepage": "https://github.com/hmj34/fazer-lang#readme"
|
|
44
|
-
}
|