@supacloud/compiler 0.21.0 → 0.21.1
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/dist/cli.js +15 -9
- package/dist/index.js +15 -9
- package/dist/migration-policy.d.ts +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -11865,23 +11865,29 @@ import * as ts10 from "@typescript/typescript6";
|
|
|
11865
11865
|
import { readFile as readFile8 } from "node:fs/promises";
|
|
11866
11866
|
import { readFileSync as readFileSync4 } from "node:fs";
|
|
11867
11867
|
import { resolve as resolve12 } from "node:path";
|
|
11868
|
+
var cachedCompilerVersion;
|
|
11868
11869
|
function compilerVersion() {
|
|
11870
|
+
if (cachedCompilerVersion !== undefined)
|
|
11871
|
+
return cachedCompilerVersion;
|
|
11869
11872
|
const manifest = JSON.parse(readFileSync4(new URL("../package.json", import.meta.url), "utf8"));
|
|
11870
11873
|
if (!manifest || typeof manifest !== "object" || !("version" in manifest) || typeof manifest.version !== "string") {
|
|
11871
11874
|
throw new Error("Cannot determine executing compiler version");
|
|
11872
11875
|
}
|
|
11873
|
-
|
|
11876
|
+
cachedCompilerVersion = manifest.version;
|
|
11877
|
+
return cachedCompilerVersion;
|
|
11878
|
+
}
|
|
11879
|
+
function migrationDependencies() {
|
|
11880
|
+
return {
|
|
11881
|
+
"@supacloud/app": "0.14.0",
|
|
11882
|
+
"@supacloud/compiler": compilerVersion(),
|
|
11883
|
+
"@supacloud/elysia": "0.16.0",
|
|
11884
|
+
elysia: "1.4.30",
|
|
11885
|
+
typescript: "7.0.2"
|
|
11886
|
+
};
|
|
11874
11887
|
}
|
|
11875
|
-
var migrationDependencies = {
|
|
11876
|
-
"@supacloud/app": "0.14.0",
|
|
11877
|
-
"@supacloud/compiler": compilerVersion(),
|
|
11878
|
-
"@supacloud/elysia": "0.16.0",
|
|
11879
|
-
elysia: "1.4.30",
|
|
11880
|
-
typescript: "7.0.2"
|
|
11881
|
-
};
|
|
11882
11888
|
async function checkMigrationDependencies(rootDir) {
|
|
11883
11889
|
const problems = [];
|
|
11884
|
-
for (const [name, expected] of Object.entries(migrationDependencies)) {
|
|
11890
|
+
for (const [name, expected] of Object.entries(migrationDependencies())) {
|
|
11885
11891
|
try {
|
|
11886
11892
|
const manifest = JSON.parse(await readFile8(resolve12(rootDir, "node_modules", name, "package.json"), "utf8"));
|
|
11887
11893
|
if (!manifest || typeof manifest !== "object" || !("name" in manifest) || manifest.name !== name || !("version" in manifest) || manifest.version !== expected) {
|
package/dist/index.js
CHANGED
|
@@ -11442,23 +11442,29 @@ import * as ts10 from "@typescript/typescript6";
|
|
|
11442
11442
|
import { readFile as readFile8 } from "node:fs/promises";
|
|
11443
11443
|
import { readFileSync as readFileSync4 } from "node:fs";
|
|
11444
11444
|
import { resolve as resolve11 } from "node:path";
|
|
11445
|
+
var cachedCompilerVersion;
|
|
11445
11446
|
function compilerVersion() {
|
|
11447
|
+
if (cachedCompilerVersion !== undefined)
|
|
11448
|
+
return cachedCompilerVersion;
|
|
11446
11449
|
const manifest = JSON.parse(readFileSync4(new URL("../package.json", import.meta.url), "utf8"));
|
|
11447
11450
|
if (!manifest || typeof manifest !== "object" || !("version" in manifest) || typeof manifest.version !== "string") {
|
|
11448
11451
|
throw new Error("Cannot determine executing compiler version");
|
|
11449
11452
|
}
|
|
11450
|
-
|
|
11453
|
+
cachedCompilerVersion = manifest.version;
|
|
11454
|
+
return cachedCompilerVersion;
|
|
11455
|
+
}
|
|
11456
|
+
function migrationDependencies() {
|
|
11457
|
+
return {
|
|
11458
|
+
"@supacloud/app": "0.14.0",
|
|
11459
|
+
"@supacloud/compiler": compilerVersion(),
|
|
11460
|
+
"@supacloud/elysia": "0.16.0",
|
|
11461
|
+
elysia: "1.4.30",
|
|
11462
|
+
typescript: "7.0.2"
|
|
11463
|
+
};
|
|
11451
11464
|
}
|
|
11452
|
-
var migrationDependencies = {
|
|
11453
|
-
"@supacloud/app": "0.14.0",
|
|
11454
|
-
"@supacloud/compiler": compilerVersion(),
|
|
11455
|
-
"@supacloud/elysia": "0.16.0",
|
|
11456
|
-
elysia: "1.4.30",
|
|
11457
|
-
typescript: "7.0.2"
|
|
11458
|
-
};
|
|
11459
11465
|
async function checkMigrationDependencies(rootDir) {
|
|
11460
11466
|
const problems = [];
|
|
11461
|
-
for (const [name, expected] of Object.entries(migrationDependencies)) {
|
|
11467
|
+
for (const [name, expected] of Object.entries(migrationDependencies())) {
|
|
11462
11468
|
try {
|
|
11463
11469
|
const manifest = JSON.parse(await readFile8(resolve11(rootDir, "node_modules", name, "package.json"), "utf8"));
|
|
11464
11470
|
if (!manifest || typeof manifest !== "object" || !("name" in manifest) || manifest.name !== name || !("version" in manifest) || manifest.version !== expected) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare
|
|
1
|
+
export declare function migrationDependencies(): Readonly<Record<string, string>>;
|
|
2
2
|
export declare function checkMigrationDependencies(rootDir: string): Promise<string[]>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@supacloud/compiler",
|
|
3
|
-
"version": "0.21.
|
|
3
|
+
"version": "0.21.1",
|
|
4
4
|
"description": "Static compiler for @supacloud/app metadata: builds the application graph from AST, validates it, and generates reflection-free factory code",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|