cluaupp 2.0.0-beta.1 → 2.0.0-beta.2

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.
@@ -1,22 +1,22 @@
1
1
  {
2
2
  "schemaVersion": 2,
3
- "generatorVersion": "2.0.0-beta.1",
4
- "profileHash": "1f6a8b3a31a8e75c98b411542f4a82e3057496da51301fc00d2d88ae04d8bf7e",
3
+ "generatorVersion": "2.0.0-beta.2",
4
+ "profileHash": "dd9f48a67175481b1270c36bbb55a1b7d22e9290f8d3e6475b2b37682242300d",
5
5
  "overridesHash": "4d9132f0307a553e92b8863663295b0ddb9fc7cad57db75a8fb7b7d1ab258f46",
6
6
  "sources": {
7
7
  "mini-api-dump": {
8
8
  "id": "mini-api-dump",
9
9
  "path": "C:\\Users\\gtofr\\OneDrive\\Documentos\\GitHub\\Cluaupp\\data\\Mini-API-Dump.json",
10
10
  "hash": "e73d0118d5fc9f134c6d8306fabecc14050ba87f3bb89ca950b0e44077283256",
11
- "loadedAt": "2026-10-09T13:01:56.828Z",
11
+ "loadedAt": "2026-10-09T13:42:19.577Z",
12
12
  "version": 1
13
13
  },
14
14
  "overrides": {
15
15
  "id": "overrides",
16
16
  "hash": "4d9132f0307a553e92b8863663295b0ddb9fc7cad57db75a8fb7b7d1ab258f46",
17
- "loadedAt": "2026-10-09T13:01:57.025Z",
17
+ "loadedAt": "2026-10-09T13:42:19.676Z",
18
18
  "path": "C:\\Users\\gtofr\\OneDrive\\Documentos\\GitHub\\Cluaupp\\api\\overrides"
19
19
  }
20
20
  },
21
- "generatedAt": "2026-10-09T13:01:58.817Z"
21
+ "generatedAt": "2026-10-09T13:42:21.235Z"
22
22
  }
@@ -2,19 +2,19 @@
2
2
  "target": "roblox",
3
3
  "schemaVersion": 2,
4
4
  "robloxApiVersion": "1",
5
- "generatorVersion": "2.0.0-beta.1",
5
+ "generatorVersion": "2.0.0-beta.2",
6
6
  "sources": {
7
7
  "mini-api-dump": {
8
8
  "id": "mini-api-dump",
9
9
  "path": "C:\\Users\\gtofr\\OneDrive\\Documentos\\GitHub\\Cluaupp\\data\\Mini-API-Dump.json",
10
10
  "hash": "e73d0118d5fc9f134c6d8306fabecc14050ba87f3bb89ca950b0e44077283256",
11
- "loadedAt": "2026-10-09T13:01:56.828Z",
11
+ "loadedAt": "2026-10-09T13:42:19.577Z",
12
12
  "version": 1
13
13
  },
14
14
  "overrides": {
15
15
  "id": "overrides",
16
16
  "hash": "4d9132f0307a553e92b8863663295b0ddb9fc7cad57db75a8fb7b7d1ab258f46",
17
- "loadedAt": "2026-10-09T13:01:57.025Z",
17
+ "loadedAt": "2026-10-09T13:42:19.676Z",
18
18
  "path": "C:\\Users\\gtofr\\OneDrive\\Documentos\\GitHub\\Cluaupp\\api\\overrides"
19
19
  }
20
20
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 2,
3
- "profileHash": "1f6a8b3a31a8e75c98b411542f4a82e3057496da51301fc00d2d88ae04d8bf7e",
3
+ "profileHash": "dd9f48a67175481b1270c36bbb55a1b7d22e9290f8d3e6475b2b37682242300d",
4
4
  "overridesHash": "4d9132f0307a553e92b8863663295b0ddb9fc7cad57db75a8fb7b7d1ab258f46",
5
5
  "robloxApiVersion": "1",
6
6
  "files": {
@@ -13,6 +13,6 @@
13
13
  "api/generated/luau/datatypes.d.luau": "555ce875e7c491a5a3c2eb90c4c2db7b56c7d3d41f10d9a7c2c667eb07f4fccc",
14
14
  "api/generated/luau/classes.d.luau": "b1faf83c53c88217370094764d5e1f6a30a05501dd916f1b759ac37cb590e6b8",
15
15
  "api/generated/luau/globals.d.luau": "44673b0daa8306aa2dd2e7c08c0c97c6e18a51926b00237ce0f1d262821d0f35",
16
- "api/generated/lsp-index.json": "a0c5c91fa6be7348489ad473af3f8c442e6f184a037808c60ebe36aa058f3fef"
16
+ "api/generated/lsp-index.json": "ba3190b92e8b38bb8e48dddca31712f3bfc15de59d475d2f810be84b4134ef28"
17
17
  }
18
18
  }
@@ -16,4 +16,4 @@ Installed by `cluaupp intellisense` into `~/.cursor/extensions` and `~/.vscode/e
16
16
  | `.shift` | states / transitions | snippets |
17
17
  | `.axiom` | groups | snippets |
18
18
 
19
- CL++ (`.clpp` / `.clp` / `.clh`) highlighting still comes from `clpp setup`.
19
+ CL++ .clp language support is installed separately through the CL++ editor extension. The clpp 0.10 VM has no setup or install subcommand. Legacy .clpp/.clh associations are retained for older projects.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cluaupp-flare",
3
3
  "displayName": "Cluaupp",
4
- "description": "Highlighting and IntelliSense for Cluaupp schemas: .flare, .hive, .mint, .bloom, .helm, .shift, .axiom. CL++ (.clpp) still comes from clpp setup.",
4
+ "description": "Highlighting and IntelliSense for Cluaupp schemas: .flare, .hive, .mint, .bloom, .helm, .shift, .axiom. CL++ language support is installed separately.",
5
5
  "version": "1.5.1",
6
6
  "publisher": "kartzdev",
7
7
  "engines": {
@@ -37,8 +37,13 @@
37
37
  "languages": [
38
38
  {
39
39
  "id": "flare",
40
- "aliases": ["Flare", "flare"],
41
- "extensions": [".flare"],
40
+ "aliases": [
41
+ "Flare",
42
+ "flare"
43
+ ],
44
+ "extensions": [
45
+ ".flare"
46
+ ],
42
47
  "configuration": "./language-configuration.json",
43
48
  "icon": {
44
49
  "light": "./icons/flare.svg",
@@ -47,8 +52,13 @@
47
52
  },
48
53
  {
49
54
  "id": "hive",
50
- "aliases": ["Hive", "hive"],
51
- "extensions": [".hive"],
55
+ "aliases": [
56
+ "Hive",
57
+ "hive"
58
+ ],
59
+ "extensions": [
60
+ ".hive"
61
+ ],
52
62
  "configuration": "./language-configuration-schema.json",
53
63
  "icon": {
54
64
  "light": "./icons/hive.svg",
@@ -57,8 +67,13 @@
57
67
  },
58
68
  {
59
69
  "id": "mint",
60
- "aliases": ["Mint", "mint"],
61
- "extensions": [".mint"],
70
+ "aliases": [
71
+ "Mint",
72
+ "mint"
73
+ ],
74
+ "extensions": [
75
+ ".mint"
76
+ ],
62
77
  "configuration": "./language-configuration-schema.json",
63
78
  "icon": {
64
79
  "light": "./icons/mint.svg",
@@ -67,8 +82,13 @@
67
82
  },
68
83
  {
69
84
  "id": "bloom",
70
- "aliases": ["Bloom", "bloom"],
71
- "extensions": [".bloom"],
85
+ "aliases": [
86
+ "Bloom",
87
+ "bloom"
88
+ ],
89
+ "extensions": [
90
+ ".bloom"
91
+ ],
72
92
  "configuration": "./language-configuration-schema.json",
73
93
  "icon": {
74
94
  "light": "./icons/bloom.svg",
@@ -77,8 +97,13 @@
77
97
  },
78
98
  {
79
99
  "id": "helm",
80
- "aliases": ["Helm", "helm"],
81
- "extensions": [".helm"],
100
+ "aliases": [
101
+ "Helm",
102
+ "helm"
103
+ ],
104
+ "extensions": [
105
+ ".helm"
106
+ ],
82
107
  "configuration": "./language-configuration-schema.json",
83
108
  "icon": {
84
109
  "light": "./icons/helm.svg",
@@ -87,8 +112,13 @@
87
112
  },
88
113
  {
89
114
  "id": "shift",
90
- "aliases": ["Shift", "shift"],
91
- "extensions": [".shift"],
115
+ "aliases": [
116
+ "Shift",
117
+ "shift"
118
+ ],
119
+ "extensions": [
120
+ ".shift"
121
+ ],
92
122
  "configuration": "./language-configuration-schema.json",
93
123
  "icon": {
94
124
  "light": "./icons/shift.svg",
@@ -97,8 +127,13 @@
97
127
  },
98
128
  {
99
129
  "id": "axiom",
100
- "aliases": ["Axiom", "axiom"],
101
- "extensions": [".axiom"],
130
+ "aliases": [
131
+ "Axiom",
132
+ "axiom"
133
+ ],
134
+ "extensions": [
135
+ ".axiom"
136
+ ],
102
137
  "configuration": "./language-configuration-schema.json",
103
138
  "icon": {
104
139
  "light": "./icons/axiom.svg",
@@ -22,6 +22,6 @@
22
22
  "opt name": {
23
23
  "prefix": "opt",
24
24
  "body": "opt name = ${1:Net}",
25
- "description": "Generated module name (Net.clh / Net.Hit)"
25
+ "description": "Generated module name (Net runtime module / Net.Hit)"
26
26
  }
27
27
  }
@@ -2,7 +2,7 @@
2
2
  "opt name": {
3
3
  "prefix": "opt",
4
4
  "body": "opt name = ${1:PlayerECS}",
5
- "description": "Generated module name (PlayerECS.clh / PlayerECS.Health)"
5
+ "description": "Generated module name (PlayerECS runtime module / PlayerECS.Health)"
6
6
  },
7
7
  "Component": {
8
8
  "prefix": "component",
@@ -30,7 +30,7 @@ function registerApiCommands(program) {
30
30
  .command("generate")
31
31
  .description("Build RobloxTargetProfile and regenerate CL++ / Luau projections")
32
32
  .option("--dump <path>", "Mini-API-Dump.json path")
33
- .option("--skip-headers", "Skip CL++ header generation")
33
+ .option("--skip-headers", "Skip legacy .clh API projections")
34
34
  .option("--skip-luau", "Skip .d.luau generation")
35
35
  .option("--docs", "No-op retained for CLI compat (Creator Docs are not mirrored)")
36
36
  .action((opts) => {
@@ -183,7 +183,7 @@ function registerTargetCommands(program) {
183
183
  });
184
184
  target
185
185
  .command("datamodel")
186
- .description("Build Typed DataModel profile + generated datamodel.clh from Rojo project")
186
+ .description("Build Typed DataModel profile (legacy projects also get .clh)")
187
187
  .argument("[folder]", "game root with default.project.json", ".")
188
188
  .option("-r, --rojo <path>", "Rojo project json")
189
189
  .action((folder, options) => {
package/generated/cli.js CHANGED
@@ -12,7 +12,6 @@ const node_path_1 = __importDefault(require("node:path"));
12
12
  const package_info_js_1 = require("./package-info.js");
13
13
  const lsp_js_1 = require("./lsp.js");
14
14
  const paths_js_1 = require("./clpp/paths.js");
15
- const contract_js_1 = require("./clpp/contract.js");
16
15
  const runner_js_1 = require("./clpp/runner.js");
17
16
  Object.defineProperty(exports, "hasClpp", { enumerable: true, get: function () { return runner_js_1.hasClpp; } });
18
17
  const intellisense_js_1 = require("./intellisense.js");
@@ -101,7 +100,8 @@ program
101
100
  });
102
101
  program
103
102
  .command("lsp")
104
- .description("Language server stdio — Flare `.flare` IntelliSense. CL++ still uses `clpp setup`.")
103
+ .description("Schema language server over stdio")
104
+ .option("--stdio", "Use standard input/output (default)")
105
105
  .argument("[folder]", "project folder", ".")
106
106
  .action((folder) => {
107
107
  (0, lsp_js_1.start)({ projectRoot: node_path_1.default.resolve(process.cwd(), folder) });
@@ -109,7 +109,7 @@ program
109
109
  program
110
110
  .command("intellisense")
111
111
  .alias("intelisense")
112
- .description("Install schema IntelliSense (.flare .hive .mint .bloom .helm .shift .axiom) + sync .vscode; CL++ via clpp install")
112
+ .description("Install schema editor support and sync .vscode")
113
113
  .argument("[folder]", "project folder", ".")
114
114
  .action(async (folder) => {
115
115
  try {
@@ -117,7 +117,6 @@ program
117
117
  (0, intellisense_js_1.syncEditorSupport)(root, (0, project_js_1.loadConfig)(root));
118
118
  await (0, intellisense_js_1.installEditorSupport)();
119
119
  console.log("cluaupp: editor associations written in", root);
120
- console.log("cluaupp:", contract_js_1.CLPP_INSTALL_HINT);
121
120
  }
122
121
  catch (err) {
123
122
  console.error(err instanceof Error ? err.message : err);
@@ -126,20 +125,22 @@ program
126
125
  });
127
126
  program
128
127
  .command("language")
129
- .description("CL++ manifest (`clpp api manifest`)")
130
- .action(() => {
128
+ .description("Describe the Roblox .clp target; --legacy probes external clpp")
129
+ .option("--legacy", "Read the manifest of the compatible legacy compiler")
130
+ .action((options) => {
131
131
  try {
132
- const bin = (0, runner_js_1.resolveClppBinary)();
133
- const version = (0, runner_js_1.clppVersion)();
134
- if (version) {
135
- console.log(version, `(${bin})`);
136
- }
137
- for (const install of (0, runner_js_1.clppInstalls)()) {
138
- if (!install.selected) {
139
- console.log(`skipped ${install.bin} (${install.version || "unknown"})`);
140
- }
141
- }
142
- console.log(JSON.stringify((0, runner_js_1.clppManifest)(), null, "\t"));
132
+ const manifest = options.legacy ? (0, runner_js_1.clppManifest)() : {
133
+ name: "Cluaupp Roblox target",
134
+ version: package_info_js_1.pkg.version,
135
+ status: "experimental",
136
+ sourceExtensions: [".clp"],
137
+ fileTags: { server: ".server.clp", client: ".client.clp", plugin: ".plugin.clp" },
138
+ importSyntax: "link",
139
+ headers: false,
140
+ builtinLinks: ["@clpp.roblox", "@clpp.libs.<Library>"],
141
+ legacy: { sourceExtensions: [".clpp", ".clh"], command: "cluaupp language --legacy" },
142
+ };
143
+ console.log(JSON.stringify(manifest, null, "\t"));
143
144
  }
144
145
  catch (err) {
145
146
  console.error(err instanceof Error ? err.message : err);
@@ -283,7 +283,7 @@ class ProjectCompiler {
283
283
  target = `${target}.clp`;
284
284
  }
285
285
  if (!target.toLowerCase().endsWith(exports.SOURCE_EXT)) {
286
- return { kind: "error", message: `cannot link '${p}': CL++ modules are .clp files`, notes: [/\.(clh|clpp)$/i.test(p) ? "CL++ 0.9 has no headers: rename the module to .clp" : "link \"./file.clp\" as Name;"] };
286
+ return { kind: "error", message: `cannot link '${p}': CL++ modules are .clp files`, notes: [/\.(clh|clpp)$/i.test(p) ? "Legacy .clh/.clpp files use a different syntax: migrate the declarations and imports to .clp; changing the extension alone is insufficient" : "link \"./file.clp\" as Name;"] };
287
287
  }
288
288
  if (!node_fs_1.default.existsSync(target)) {
289
289
  return { kind: "error", message: `cannot open module '${p}'` };
@@ -13,8 +13,6 @@ const node_os_1 = __importDefault(require("node:os"));
13
13
  const node_path_1 = __importDefault(require("node:path"));
14
14
  const node_child_process_1 = require("node:child_process");
15
15
  const package_info_js_1 = require("./package-info.js");
16
- const contract_js_1 = require("./clpp/contract.js");
17
- const runner_js_1 = require("./clpp/runner.js");
18
16
  const paths_js_1 = require("./clpp/paths.js");
19
17
  const editor_install_js_1 = require("./editor-install.js");
20
18
  function copyDir(from, to) {
@@ -111,7 +109,7 @@ function writeVscode(root) {
111
109
  });
112
110
  }
113
111
  function diagnosticsFor(_source, _fileName) {
114
- // Language diagnostics belong to `clpp install`. Do not spawn `clpp api compile`
112
+ // CL++ diagnostics are reported by the compiler during build. Do not spawn a compiler
115
113
  // from the editor — that duplicates source=clpp and freezes on every keystroke.
116
114
  return [];
117
115
  }
@@ -198,18 +196,6 @@ async function installEditorSupport() {
198
196
  console.log(" ", dest);
199
197
  }
200
198
  }
201
- if ((0, runner_js_1.hasClpp)()) {
202
- const result = (0, node_child_process_1.spawnSync)("clpp", ["install"], { encoding: "utf8", windowsHide: true });
203
- if (result.status === 0) {
204
- console.log(String(result.stderr || result.stdout || "clpp install ok").trim());
205
- }
206
- else {
207
- console.log("cluaupp:", contract_js_1.CLPP_INSTALL_HINT);
208
- }
209
- }
210
- else {
211
- console.log("cluaupp:", contract_js_1.CLPP_INSTALL_HINT);
212
- }
213
199
  return { local };
214
200
  }
215
201
  exports.isClppSource = paths_js_1.isSourceFile;
package/generated/lsp.js CHANGED
@@ -34,7 +34,7 @@ function flareDiagnostics(document) {
34
34
  }));
35
35
  }
36
36
  function start(_options = {}) {
37
- const connection = (0, node_1.createConnection)(node_1.ProposedFeatures.all);
37
+ const connection = (0, node_1.createConnection)(node_1.ProposedFeatures.all, process.stdin, process.stdout);
38
38
  const documents = new node_1.TextDocuments(vscode_languageserver_textdocument_1.TextDocument);
39
39
  connection.onInitialize(() => ({
40
40
  capabilities: {
@@ -12,6 +12,7 @@ exports.writeDatamodelArtifacts = writeDatamodelArtifacts;
12
12
  const node_fs_1 = __importDefault(require("node:fs"));
13
13
  const node_path_1 = __importDefault(require("node:path"));
14
14
  const datamodel_js_1 = require("./datamodel.js");
15
+ const paths_js_1 = require("../clpp/paths.js");
15
16
  function safeIdent(name) {
16
17
  const cleaned = name.replace(/[^A-Za-z0-9_]/g, "_");
17
18
  return /^[A-Za-z_]/.test(cleaned) ? cleaned : `_${cleaned}`;
@@ -66,6 +67,17 @@ function writeDatamodelArtifacts(projectRoot, opts) {
66
67
  node_fs_1.default.mkdirSync(outDir, { recursive: true });
67
68
  const profilePath = node_path_1.default.join(outDir, "datamodel-profile.json");
68
69
  node_fs_1.default.writeFileSync(profilePath, JSON.stringify(profileWithoutIndex(profile), null, "\t") + "\n", "utf8");
70
+ let sourceRoot = "src";
71
+ const configPath = node_path_1.default.join(projectRoot, "cluaupp.config.json");
72
+ if (node_fs_1.default.existsSync(configPath)) {
73
+ const config = JSON.parse(node_fs_1.default.readFileSync(configPath, "utf8"));
74
+ if (typeof config.rootDir === "string")
75
+ sourceRoot = config.rootDir;
76
+ }
77
+ const sources = (0, paths_js_1.collectSources)(node_path_1.default.resolve(projectRoot, sourceRoot));
78
+ const modern = sources.some(file => /\.clp$/i.test(file)) && !sources.some(file => /\.clpp$/i.test(file));
79
+ if (modern && !opts?.headerPath)
80
+ return { profile, profilePath, headerPath: null };
69
81
  const headerPath = opts?.headerPath ||
70
82
  node_path_1.default.join(projectRoot, "include", "clpp", "generated", "datamodel.clh");
71
83
  node_fs_1.default.mkdirSync(node_path_1.default.dirname(headerPath), { recursive: true });
@@ -325,6 +325,10 @@ function compileOptions(root, config, file, rel) {
325
325
  outDir: config.outDir,
326
326
  };
327
327
  }
328
+ function needsLegacyHeaders(srcDir) {
329
+ const sources = (0, paths_js_1.collectSources)(srcDir);
330
+ return sources.some(file => /\.clpp$/i.test(file)) || !sources.some(file => /\.clp$/i.test(file));
331
+ }
328
332
  function compileSchemaJobs(root, config, srcDir) {
329
333
  const jobs = [];
330
334
  const errors = [];
@@ -339,7 +343,8 @@ function compileSchemaJobs(root, config, srcDir) {
339
343
  if (!(0, safe_paths_js_1.isInside)(node_path_1.default.resolve(root, config.rootDir), headerDest) && !(0, safe_paths_js_1.isInside)(srcDir, headerDest)) {
340
344
  throw new Error(`cluaupp schema: skip unsafe header ${emit.headerRel}`);
341
345
  }
342
- writeTextIfChanged(headerDest, emit.header);
346
+ if (needsLegacyHeaders(srcDir))
347
+ writeTextIfChanged(headerDest, emit.header);
343
348
  jobs.push({
344
349
  rel,
345
350
  files: [{ name: emit.luauRel, contents: emit.luau }],
@@ -367,7 +372,8 @@ function compileFlareJobs(root, config, srcDir) {
367
372
  if (!(0, safe_paths_js_1.isInside)(node_path_1.default.resolve(root, config.rootDir), headerDest) && !(0, safe_paths_js_1.isInside)(srcDir, headerDest)) {
368
373
  throw new Error(`cluaupp flare: skip unsafe header ${emit.headerRel}`);
369
374
  }
370
- writeTextIfChanged(headerDest, emit.header);
375
+ if (needsLegacyHeaders(srcDir))
376
+ writeTextIfChanged(headerDest, emit.header);
371
377
  jobs.push({
372
378
  rel,
373
379
  files: [{ name: emit.luauRel, contents: emit.luau }],
@@ -631,7 +637,10 @@ function writeJobs(root, config, jobs, format) {
631
637
  }
632
638
  function ensureVendor(root) {
633
639
  copyRuntime(root);
634
- copyHeaders(root);
640
+ const config = loadConfig(root);
641
+ if ((0, paths_js_1.collectSources)(node_path_1.default.join(root, config.rootDir)).some(file => /\.clpp$/i.test(file))) {
642
+ copyHeaders(root);
643
+ }
635
644
  }
636
645
  function finishBuild(root, config, compiled, options) {
637
646
  const exitOnError = options.exitOnError !== false;
@@ -760,10 +769,15 @@ async function buildAsync(root, options = {}) {
760
769
  }
761
770
  async function init(dest) {
762
771
  const target = (0, safe_paths_js_1.assertInitDest)(dest);
772
+ if (node_fs_1.default.existsSync(node_path_1.default.join(target, "cluaupp.config.json")) || node_fs_1.default.existsSync(node_path_1.default.join(target, "src"))) {
773
+ throw new Error("cluaupp init: project already exists; choose a new folder. Existing .clpp/.clh sources require migration, not another init.");
774
+ }
763
775
  const template = node_path_1.default.join(__dirname, "..", "..", "templates", "game-modern");
764
- const include = node_path_1.default.join(__dirname, "..", "..", "include");
765
776
  copyDir(template, target);
766
- copyDir(include, node_path_1.default.join(target, "include"));
777
+ const packageFile = node_path_1.default.join(target, "package.json");
778
+ const projectPackage = JSON.parse(node_fs_1.default.readFileSync(packageFile, "utf8"));
779
+ projectPackage.devDependencies = { ...projectPackage.devDependencies, cluaupp: package_info_js_1.pkg.version };
780
+ node_fs_1.default.writeFileSync(packageFile, JSON.stringify(projectPackage, null, "\t") + "\n");
767
781
  const skills = node_path_1.default.join(__dirname, "..", "..", "skills");
768
782
  if (node_fs_1.default.existsSync(skills)) {
769
783
  copyDir(skills, node_path_1.default.join(target, ".cursor", "skills"));
@@ -777,7 +791,8 @@ async function init(dest) {
777
791
  console.log(" CL++ 0.10 editor extension provides syntax highlighting; Cluaupp compiles Roblox .clp files");
778
792
  console.log(" cluaupp intellisense (schema .flare .hive .mint .bloom .helm .shift .axiom)");
779
793
  console.log(" rokit install");
780
- console.log(" cluaupp build");
794
+ console.log(" npm install");
795
+ console.log(" npm run build");
781
796
  console.log(" rojo serve");
782
797
  }
783
798
  function pidAlive(pid) {
@@ -0,0 +1,5 @@
1
+ # Legacy CL++ headers
2
+
3
+ The .clh files in this directory use the legacy .clpp compiler syntax. They are preserved for the explicit legacy adapter and API projection tests. They are not modules for modern .clp programs, and modern cluaupp init and build do not copy them into a project.
4
+
5
+ Modern Roblox code uses link @clpp.roblox; and libraries use link @clpp.libs.Ward as Ward; (replace Ward with the runtime library). The API types come from the registry. Changing .clh to .clp does not migrate the syntax. Generated schema bindings still need modern type projections; legacy headers are not advertised as modern bindings.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cluaupp",
3
- "version": "2.0.0-beta.1",
3
+ "version": "2.0.0-beta.2",
4
4
  "description": "Roblox target for CL++: compile .clp to Luau with Rojo and CluauppLibs.",
5
5
  "author": "KartzDev",
6
6
  "license": "MIT",
@@ -47,7 +47,7 @@
47
47
  "dev:cli": "tsx src/cli.ts",
48
48
  "prepare": "tsc",
49
49
  "postinstall": "node scripts/postinstall-native.js && node scripts/postinstall-editor.js",
50
- "test": "node test/handshake.test.js && node test/source-map.test.js && node test/cache-invalidation.test.js && node test/package.test.js && node test/security.test.js && node test/understander.test.js && node test/modern-clp.test.js && node test/out.test.js && node test/types.test.js && node test/modules.test.js && node test/modules-import.test.js && node test/gen-rojo-tree.test.js && node test/get-service.test.js && node test/clpp.test.js && node test/flare.test.js && node test/native.test.js && node test/postprocess.test.js && node test/api.test.js && node test/api-reuse.test.js && node test/context-safety.test.js && node test/datamodel.test.js && node test/platform-analyzers.test.js && node test/platform-extras.test.js && node test/generator.test.js && node test/studio/smoke.test.js",
50
+ "test": "node test/cli-modern.test.js && node test/handshake.test.js && node test/source-map.test.js && node test/cache-invalidation.test.js && node test/package.test.js && node test/security.test.js && node test/understander.test.js && node test/modern-clp.test.js && node test/out.test.js && node test/types.test.js && node test/modules.test.js && node test/modules-import.test.js && node test/gen-rojo-tree.test.js && node test/get-service.test.js && node test/clpp.test.js && node test/flare.test.js && node test/native.test.js && node test/postprocess.test.js && node test/api.test.js && node test/api-reuse.test.js && node test/context-safety.test.js && node test/datamodel.test.js && node test/platform-analyzers.test.js && node test/platform-extras.test.js && node test/generator.test.js && node test/studio/smoke.test.js",
51
51
  "test:clpp-contract": "node test/clpp.test.js",
52
52
  "test:modern": "node test/modern-clp.test.js",
53
53
  "bench": "node scripts/bench-site.cjs",
package/src/api-cli.ts CHANGED
@@ -55,7 +55,7 @@ export function registerApiCommands(program: import("commander").Command): void
55
55
  .command("generate")
56
56
  .description("Build RobloxTargetProfile and regenerate CL++ / Luau projections")
57
57
  .option("--dump <path>", "Mini-API-Dump.json path")
58
- .option("--skip-headers", "Skip CL++ header generation")
58
+ .option("--skip-headers", "Skip legacy .clh API projections")
59
59
  .option("--skip-luau", "Skip .d.luau generation")
60
60
  .option("--docs", "No-op retained for CLI compat (Creator Docs are not mirrored)")
61
61
  .action((opts: { dump?: string; skipHeaders?: boolean; skipLuau?: boolean; docs?: boolean }) => {
@@ -235,7 +235,7 @@ export function registerTargetCommands(program: import("commander").Command): vo
235
235
 
236
236
  target
237
237
  .command("datamodel")
238
- .description("Build Typed DataModel profile + generated datamodel.clh from Rojo project")
238
+ .description("Build Typed DataModel profile (legacy projects also get .clh)")
239
239
  .argument("[folder]", "game root with default.project.json", ".")
240
240
  .option("-r, --rojo <path>", "Rojo project json")
241
241
  .action((folder: string, options: { rojo?: string }) => {
package/src/cli.ts CHANGED
@@ -4,8 +4,7 @@ import path from "node:path";
4
4
  import { pkg } from "./package-info.js";
5
5
  import { start as startLsp } from "./lsp.js";
6
6
  import { collectSources, toLuauPath } from "./clpp/paths.js";
7
- import { CLPP_INSTALL_HINT } from "./clpp/contract.js";
8
- import { clppInstalls, clppManifest, clppVersion, hasClpp, resolveClppBinary } from "./clpp/runner.js";
7
+ import { clppManifest, hasClpp } from "./clpp/runner.js";
9
8
  import { installEditorSupport, syncEditorSupport } from "./intellisense.js";
10
9
  import { RojoMapper } from "./utils/rojo-mapper.js";
11
10
  import { ProcessOrchestrator } from "./utils/process-orchestrator.js";
@@ -103,7 +102,8 @@ program
103
102
 
104
103
  program
105
104
  .command("lsp")
106
- .description("Language server stdio — Flare `.flare` IntelliSense. CL++ still uses `clpp setup`.")
105
+ .description("Schema language server over stdio")
106
+ .option("--stdio", "Use standard input/output (default)")
107
107
  .argument("[folder]", "project folder", ".")
108
108
  .action((folder: string) => {
109
109
  startLsp({ projectRoot: path.resolve(process.cwd(), folder) });
@@ -112,7 +112,7 @@ program
112
112
  program
113
113
  .command("intellisense")
114
114
  .alias("intelisense")
115
- .description("Install schema IntelliSense (.flare .hive .mint .bloom .helm .shift .axiom) + sync .vscode; CL++ via clpp install")
115
+ .description("Install schema editor support and sync .vscode")
116
116
  .argument("[folder]", "project folder", ".")
117
117
  .action(async (folder: string) => {
118
118
  try {
@@ -120,7 +120,6 @@ program
120
120
  syncEditorSupport(root, loadConfig(root));
121
121
  await installEditorSupport();
122
122
  console.log("cluaupp: editor associations written in", root);
123
- console.log("cluaupp:", CLPP_INSTALL_HINT);
124
123
  } catch (err) {
125
124
  console.error(err instanceof Error ? err.message : err);
126
125
  process.exit(1);
@@ -129,20 +128,22 @@ program
129
128
 
130
129
  program
131
130
  .command("language")
132
- .description("CL++ manifest (`clpp api manifest`)")
133
- .action(() => {
131
+ .description("Describe the Roblox .clp target; --legacy probes external clpp")
132
+ .option("--legacy", "Read the manifest of the compatible legacy compiler")
133
+ .action((options: { legacy?: boolean }) => {
134
134
  try {
135
- const bin = resolveClppBinary();
136
- const version = clppVersion();
137
- if (version) {
138
- console.log(version, `(${bin})`);
139
- }
140
- for (const install of clppInstalls()) {
141
- if (!install.selected) {
142
- console.log(`skipped ${install.bin} (${install.version || "unknown"})`);
143
- }
144
- }
145
- console.log(JSON.stringify(clppManifest(), null, "\t"));
135
+ const manifest = options.legacy ? clppManifest() : {
136
+ name: "Cluaupp Roblox target",
137
+ version: pkg.version,
138
+ status: "experimental",
139
+ sourceExtensions: [".clp"],
140
+ fileTags: { server: ".server.clp", client: ".client.clp", plugin: ".plugin.clp" },
141
+ importSyntax: "link",
142
+ headers: false,
143
+ builtinLinks: ["@clpp.roblox", "@clpp.libs.<Library>"],
144
+ legacy: { sourceExtensions: [".clpp", ".clh"], command: "cluaupp language --legacy" },
145
+ };
146
+ console.log(JSON.stringify(manifest, null, "\t"));
146
147
  } catch (err) {
147
148
  console.error(err instanceof Error ? err.message : err);
148
149
  process.exit(1);
@@ -300,7 +300,7 @@ export class ProjectCompiler {
300
300
  target = `${target}.clp`;
301
301
  }
302
302
  if (!target.toLowerCase().endsWith(SOURCE_EXT)) {
303
- return { kind: "error", message: `cannot link '${p}': CL++ modules are .clp files`, notes: [/\.(clh|clpp)$/i.test(p) ? "CL++ 0.9 has no headers: rename the module to .clp" : "link \"./file.clp\" as Name;"] };
303
+ return { kind: "error", message: `cannot link '${p}': CL++ modules are .clp files`, notes: [/\.(clh|clpp)$/i.test(p) ? "Legacy .clh/.clpp files use a different syntax: migrate the declarations and imports to .clp; changing the extension alone is insufficient" : "link \"./file.clp\" as Name;"] };
304
304
  }
305
305
  if (!fs.existsSync(target)) {
306
306
  return { kind: "error", message: `cannot open module '${p}'` };
@@ -4,8 +4,6 @@ import path from "node:path";
4
4
  import { spawnSync } from "node:child_process";
5
5
  import { pkg, projectRoot as PACKAGE_ROOT } from "./package-info.js";
6
6
  import type { ProjectConfig } from "./types.js";
7
- import { CLPP_INSTALL_HINT } from "./clpp/contract.js";
8
- import { hasClpp } from "./clpp/runner.js";
9
7
  import { isSourceFile } from "./clpp/paths.js";
10
8
  import { editorBin } from "./editor-install.js";
11
9
 
@@ -114,7 +112,7 @@ function writeVscode(root: string): void {
114
112
  }
115
113
 
116
114
  export function diagnosticsFor(_source?: string, _fileName?: string): CluauppDiagnostic[] {
117
- // Language diagnostics belong to `clpp install`. Do not spawn `clpp api compile`
115
+ // CL++ diagnostics are reported by the compiler during build. Do not spawn a compiler
118
116
  // from the editor — that duplicates source=clpp and freezes on every keystroke.
119
117
  return [];
120
118
  }
@@ -204,16 +202,6 @@ export async function installEditorSupport() {
204
202
  console.log(" ", dest);
205
203
  }
206
204
  }
207
- if (hasClpp()) {
208
- const result = spawnSync("clpp", ["install"], { encoding: "utf8", windowsHide: true });
209
- if (result.status === 0) {
210
- console.log(String(result.stderr || result.stdout || "clpp install ok").trim());
211
- } else {
212
- console.log("cluaupp:", CLPP_INSTALL_HINT);
213
- }
214
- } else {
215
- console.log("cluaupp:", CLPP_INSTALL_HINT);
216
- }
217
205
  return { local };
218
206
  }
219
207
 
package/src/lsp.ts CHANGED
@@ -61,7 +61,7 @@ function flareDiagnostics(document: TextDocument): Diagnostic[] {
61
61
  }
62
62
 
63
63
  export function start(_options: { projectRoot?: string } = {}): void {
64
- const connection = createConnection(ProposedFeatures.all);
64
+ const connection = createConnection(ProposedFeatures.all, process.stdin, process.stdout);
65
65
  const documents = new TextDocuments(TextDocument);
66
66
 
67
67
  connection.onInitialize(() => ({