@absolutejs/absolute 0.19.0-beta.1049 → 0.19.0-beta.1050
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/angular/components/core/streamingSlotRegistrar.js +1 -1
- package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
- package/dist/build.js +105 -2
- package/dist/build.js.map +5 -4
- package/dist/cli/config/client.js +12 -9
- package/dist/cli/config/server.js +393 -213
- package/dist/cli/index.js +456 -106
- package/dist/index.js +105 -2
- package/dist/index.js.map +5 -4
- package/dist/src/cli/add/dependencies.d.ts +1 -0
- package/dist/src/cli/config/absolute/resolveAbsoluteConfig.d.ts +5 -0
- package/dist/src/cli/config/integrations/IntegrationsPanel.d.ts +2 -2
- package/dist/src/cli/config/page/configStyles.d.ts +1 -1
- package/dist/src/cli/config/server.d.ts +31 -0
- package/dist/src/cli/integrations/addPlugin.d.ts +8 -0
- package/dist/src/cli/integrations/catalog.d.ts +20 -0
- package/dist/src/utils/stripStringsAndComments.d.ts +18 -0
- package/dist/types/config.d.ts +2 -0
- package/dist/types/integrationsPanel.d.ts +29 -0
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -1150,6 +1150,109 @@ var init_devCert = __esm(() => {
|
|
|
1150
1150
|
KEY_PATH = join5(CERT_DIR, "key.pem");
|
|
1151
1151
|
});
|
|
1152
1152
|
|
|
1153
|
+
// src/utils/stripStringsAndComments.ts
|
|
1154
|
+
var stripStringsAndComments = (source) => {
|
|
1155
|
+
const { length } = source;
|
|
1156
|
+
const stack = [];
|
|
1157
|
+
let result = "";
|
|
1158
|
+
let index = 0;
|
|
1159
|
+
const top = () => stack[stack.length - 1];
|
|
1160
|
+
const skipLineComment = () => {
|
|
1161
|
+
index += 2;
|
|
1162
|
+
while (index < length && source.charAt(index) !== `
|
|
1163
|
+
`)
|
|
1164
|
+
index += 1;
|
|
1165
|
+
};
|
|
1166
|
+
const skipBlockComment = () => {
|
|
1167
|
+
index += 2;
|
|
1168
|
+
while (index < length && !(source.charAt(index) === "*" && source.charAt(index + 1) === "/"))
|
|
1169
|
+
index += 1;
|
|
1170
|
+
index += 2;
|
|
1171
|
+
};
|
|
1172
|
+
const skipQuoted = (quote) => {
|
|
1173
|
+
index += 1;
|
|
1174
|
+
while (index < length && source.charAt(index) !== quote)
|
|
1175
|
+
index += source.charAt(index) === "\\" ? 2 : 1;
|
|
1176
|
+
index += 1;
|
|
1177
|
+
};
|
|
1178
|
+
const startCommentOrString = () => {
|
|
1179
|
+
const char = source.charAt(index);
|
|
1180
|
+
const next = source.charAt(index + 1);
|
|
1181
|
+
const isLine = char === "/" && next === "/";
|
|
1182
|
+
const isBlock = char === "/" && next === "*";
|
|
1183
|
+
const isQuote = char === "'" || char === '"';
|
|
1184
|
+
if (isLine)
|
|
1185
|
+
skipLineComment();
|
|
1186
|
+
else if (isBlock)
|
|
1187
|
+
skipBlockComment();
|
|
1188
|
+
else if (isQuote)
|
|
1189
|
+
skipQuoted(char);
|
|
1190
|
+
return isLine || isBlock || isQuote;
|
|
1191
|
+
};
|
|
1192
|
+
const pushTemplate = () => {
|
|
1193
|
+
stack.push(0);
|
|
1194
|
+
index += 1;
|
|
1195
|
+
};
|
|
1196
|
+
const openBrace = () => {
|
|
1197
|
+
stack.push((stack.pop() ?? 0) + 1);
|
|
1198
|
+
index += 1;
|
|
1199
|
+
};
|
|
1200
|
+
const closeBrace = () => {
|
|
1201
|
+
const depth = (stack.pop() ?? 0) - 1;
|
|
1202
|
+
index += 1;
|
|
1203
|
+
if (depth > 0)
|
|
1204
|
+
stack.push(depth);
|
|
1205
|
+
};
|
|
1206
|
+
const handleTopLevel = () => {
|
|
1207
|
+
if (startCommentOrString())
|
|
1208
|
+
return;
|
|
1209
|
+
if (source.charAt(index) === "`")
|
|
1210
|
+
pushTemplate();
|
|
1211
|
+
else {
|
|
1212
|
+
result += source.charAt(index);
|
|
1213
|
+
index += 1;
|
|
1214
|
+
}
|
|
1215
|
+
};
|
|
1216
|
+
const handleTemplateText = () => {
|
|
1217
|
+
const char = source.charAt(index);
|
|
1218
|
+
if (char === "\\")
|
|
1219
|
+
index += 2;
|
|
1220
|
+
else if (char === "`") {
|
|
1221
|
+
stack.pop();
|
|
1222
|
+
index += 1;
|
|
1223
|
+
} else if (char === "$" && source.charAt(index + 1) === "{") {
|
|
1224
|
+
stack.push(1);
|
|
1225
|
+
index += 2;
|
|
1226
|
+
} else
|
|
1227
|
+
index += 1;
|
|
1228
|
+
};
|
|
1229
|
+
const handleInterp = () => {
|
|
1230
|
+
if (startCommentOrString())
|
|
1231
|
+
return;
|
|
1232
|
+
const char = source.charAt(index);
|
|
1233
|
+
if (char === "`")
|
|
1234
|
+
pushTemplate();
|
|
1235
|
+
else if (char === "{")
|
|
1236
|
+
openBrace();
|
|
1237
|
+
else if (char === "}")
|
|
1238
|
+
closeBrace();
|
|
1239
|
+
else
|
|
1240
|
+
index += 1;
|
|
1241
|
+
};
|
|
1242
|
+
const step = () => {
|
|
1243
|
+
const frame = top();
|
|
1244
|
+
if (frame === undefined)
|
|
1245
|
+
handleTopLevel();
|
|
1246
|
+
else if (frame === 0)
|
|
1247
|
+
handleTemplateText();
|
|
1248
|
+
else
|
|
1249
|
+
handleInterp();
|
|
1250
|
+
};
|
|
1251
|
+
while (index < length)
|
|
1252
|
+
step();
|
|
1253
|
+
return result;
|
|
1254
|
+
};
|
|
1255
|
+
|
|
1153
1256
|
// node_modules/typescript/lib/typescript.js
|
|
1154
1257
|
var require_typescript = __commonJS((exports, module) => {
|
|
1155
1258
|
var __dirname = "/home/alexkahn/abs/absolutejs/node_modules/typescript/lib", __filename = "/home/alexkahn/abs/absolutejs/node_modules/typescript/lib/typescript.js";
|
|
@@ -172157,7 +172260,7 @@ var import_typescript4, CONFIG_CANDIDATES2, RUNTIME_FIELDS, findConfigPath2 = (c
|
|
|
172157
172260
|
return candidate;
|
|
172158
172261
|
}
|
|
172159
172262
|
return null;
|
|
172160
|
-
}, findConfigObject = (sourceFile) => {
|
|
172263
|
+
}, parseSource = (configPath2, text) => import_typescript4.default.createSourceFile(configPath2, text, import_typescript4.default.ScriptTarget.Latest, true), findConfigObject = (sourceFile) => {
|
|
172161
172264
|
let found = null;
|
|
172162
172265
|
const visit = (node) => {
|
|
172163
172266
|
if (found)
|
|
@@ -172174,6 +172277,74 @@ var import_typescript4, CONFIG_CANDIDATES2, RUNTIME_FIELDS, findConfigPath2 = (c
|
|
|
172174
172277
|
};
|
|
172175
172278
|
visit(sourceFile);
|
|
172176
172279
|
return found;
|
|
172280
|
+
}, parseConfigObject = (configPath2) => {
|
|
172281
|
+
const text = readFileSync16(configPath2, "utf-8");
|
|
172282
|
+
return { object: findConfigObject(parseSource(configPath2, text)), text };
|
|
172283
|
+
}, evalLiteral = (node) => {
|
|
172284
|
+
if (import_typescript4.default.isStringLiteralLike(node)) {
|
|
172285
|
+
return { opaque: false, value: node.text };
|
|
172286
|
+
}
|
|
172287
|
+
if (node.kind === import_typescript4.default.SyntaxKind.TrueKeyword) {
|
|
172288
|
+
return { opaque: false, value: true };
|
|
172289
|
+
}
|
|
172290
|
+
if (node.kind === import_typescript4.default.SyntaxKind.FalseKeyword) {
|
|
172291
|
+
return { opaque: false, value: false };
|
|
172292
|
+
}
|
|
172293
|
+
if (node.kind === import_typescript4.default.SyntaxKind.NullKeyword) {
|
|
172294
|
+
return { opaque: false, value: null };
|
|
172295
|
+
}
|
|
172296
|
+
if (import_typescript4.default.isNumericLiteral(node)) {
|
|
172297
|
+
return { opaque: false, value: Number(node.text) };
|
|
172298
|
+
}
|
|
172299
|
+
if (import_typescript4.default.isPrefixUnaryExpression(node) && node.operator === import_typescript4.default.SyntaxKind.MinusToken && import_typescript4.default.isNumericLiteral(node.operand)) {
|
|
172300
|
+
return { opaque: false, value: -Number(node.operand.text) };
|
|
172301
|
+
}
|
|
172302
|
+
if (import_typescript4.default.isArrayLiteralExpression(node)) {
|
|
172303
|
+
const items = [];
|
|
172304
|
+
for (const element of node.elements) {
|
|
172305
|
+
const result = evalLiteral(element);
|
|
172306
|
+
if (result.opaque)
|
|
172307
|
+
return { opaque: true, value: undefined };
|
|
172308
|
+
items.push(result.value);
|
|
172309
|
+
}
|
|
172310
|
+
return { opaque: false, value: items };
|
|
172311
|
+
}
|
|
172312
|
+
if (import_typescript4.default.isObjectLiteralExpression(node)) {
|
|
172313
|
+
const object = {};
|
|
172314
|
+
for (const property of node.properties) {
|
|
172315
|
+
if (!import_typescript4.default.isPropertyAssignment(property) || !(import_typescript4.default.isIdentifier(property.name) || import_typescript4.default.isStringLiteral(property.name))) {
|
|
172316
|
+
return { opaque: true, value: undefined };
|
|
172317
|
+
}
|
|
172318
|
+
const result = evalLiteral(property.initializer);
|
|
172319
|
+
if (result.opaque)
|
|
172320
|
+
return { opaque: true, value: undefined };
|
|
172321
|
+
object[property.name.text] = result.value;
|
|
172322
|
+
}
|
|
172323
|
+
return { opaque: false, value: object };
|
|
172324
|
+
}
|
|
172325
|
+
return { opaque: true, value: undefined };
|
|
172326
|
+
}, readCurrent = (configPath2) => {
|
|
172327
|
+
const current = {};
|
|
172328
|
+
const opaqueKeys = [];
|
|
172329
|
+
const { object } = parseConfigObject(configPath2);
|
|
172330
|
+
if (!object)
|
|
172331
|
+
return { current, opaqueKeys };
|
|
172332
|
+
for (const property of object.properties) {
|
|
172333
|
+
if (!import_typescript4.default.isPropertyAssignment(property) || !(import_typescript4.default.isIdentifier(property.name) || import_typescript4.default.isStringLiteral(property.name))) {
|
|
172334
|
+
continue;
|
|
172335
|
+
}
|
|
172336
|
+
const name = property.name.text;
|
|
172337
|
+
const result = evalLiteral(property.initializer);
|
|
172338
|
+
if (result.opaque)
|
|
172339
|
+
opaqueKeys.push(name);
|
|
172340
|
+
else
|
|
172341
|
+
current[name] = result.value;
|
|
172342
|
+
}
|
|
172343
|
+
return { current, opaqueKeys };
|
|
172344
|
+
}, readAbsoluteConfigValues = (cwd, override) => {
|
|
172345
|
+
const configPath2 = findConfigPath2(cwd, override);
|
|
172346
|
+
const { current, opaqueKeys } = configPath2 ? readCurrent(configPath2) : { current: {}, opaqueKeys: [] };
|
|
172347
|
+
return { configPath: configPath2, current, opaqueKeys };
|
|
172177
172348
|
};
|
|
172178
172349
|
var init_resolveAbsoluteConfig = __esm(() => {
|
|
172179
172350
|
init_fromType();
|
|
@@ -173440,7 +173611,7 @@ var FRAMEWORK_DEPENDENCIES, toSpecs = (record) => Object.entries(record).map(([n
|
|
|
173440
173611
|
return { ok: true, specs };
|
|
173441
173612
|
const succeeded = runBunAdd(cwd, deps, false) && runBunAdd(cwd, devDeps, true);
|
|
173442
173613
|
return { ok: succeeded, specs };
|
|
173443
|
-
};
|
|
173614
|
+
}, installPackages = (cwd, specs, dev2 = false) => runBunAdd(cwd, specs, dev2);
|
|
173444
173615
|
var init_dependencies = __esm(() => {
|
|
173445
173616
|
FRAMEWORK_DEPENDENCIES = {
|
|
173446
173617
|
angular: {
|
|
@@ -173475,14 +173646,173 @@ var init_dependencies = __esm(() => {
|
|
|
173475
173646
|
};
|
|
173476
173647
|
});
|
|
173477
173648
|
|
|
173478
|
-
// src/cli/
|
|
173479
|
-
|
|
173649
|
+
// src/cli/integrations/catalog.ts
|
|
173650
|
+
var INTEGRATIONS, findIntegration = (id) => INTEGRATIONS.find((integration) => integration.id === id) ?? null, isIntegrationId = (value) => INTEGRATIONS.some((integration) => integration.id === value);
|
|
173651
|
+
var init_catalog = __esm(() => {
|
|
173652
|
+
INTEGRATIONS = [
|
|
173653
|
+
{
|
|
173654
|
+
blurb: "Auto-derived OpenAPI docs + Scalar/Swagger UI from your route schemas.",
|
|
173655
|
+
id: "openapi",
|
|
173656
|
+
label: "OpenAPI",
|
|
173657
|
+
packages: [],
|
|
173658
|
+
wiring: { field: "openapi", kind: "config" }
|
|
173659
|
+
},
|
|
173660
|
+
{
|
|
173661
|
+
blurb: "Production distributed tracing via OpenTelemetry (complements `absolute inspect`).",
|
|
173662
|
+
id: "telemetry",
|
|
173663
|
+
label: "OpenTelemetry",
|
|
173664
|
+
packages: ["@elysiajs/opentelemetry"],
|
|
173665
|
+
wiring: { field: "telemetry", kind: "config" }
|
|
173666
|
+
},
|
|
173667
|
+
{
|
|
173668
|
+
blurb: "Cross-origin resource sharing (CORS) headers.",
|
|
173669
|
+
id: "cors",
|
|
173670
|
+
label: "@elysiajs/cors",
|
|
173671
|
+
packages: ["@elysiajs/cors"],
|
|
173672
|
+
wiring: {
|
|
173673
|
+
importLine: "import { cors } from '@elysiajs/cors';",
|
|
173674
|
+
kind: "use",
|
|
173675
|
+
useLine: ".use(cors())"
|
|
173676
|
+
}
|
|
173677
|
+
},
|
|
173678
|
+
{
|
|
173679
|
+
blurb: "Sign and verify your own JWTs \u2014 custom API/service tokens.",
|
|
173680
|
+
id: "jwt",
|
|
173681
|
+
label: "@elysiajs/jwt",
|
|
173682
|
+
note: "Not for user login. For authentication (OAuth2, SSO, MFA, passkeys, sessions) use the Auth panel + @absolutejs/auth.",
|
|
173683
|
+
packages: ["@elysiajs/jwt"],
|
|
173684
|
+
wiring: {
|
|
173685
|
+
importLine: "import { jwt } from '@elysiajs/jwt';",
|
|
173686
|
+
kind: "use",
|
|
173687
|
+
useLine: ".use(jwt({ name: 'jwt', secret: getEnv('JWT_SECRET') }))"
|
|
173688
|
+
}
|
|
173689
|
+
},
|
|
173690
|
+
{
|
|
173691
|
+
blurb: "Scheduled jobs on a cron pattern.",
|
|
173692
|
+
id: "cron",
|
|
173693
|
+
label: "@elysiajs/cron",
|
|
173694
|
+
packages: ["@elysiajs/cron"],
|
|
173695
|
+
wiring: {
|
|
173696
|
+
importLine: "import { cron } from '@elysiajs/cron';",
|
|
173697
|
+
kind: "use",
|
|
173698
|
+
useLine: ".use(cron({ name: 'heartbeat', pattern: '0 */6 * * *', run() {} }))"
|
|
173699
|
+
}
|
|
173700
|
+
}
|
|
173701
|
+
];
|
|
173702
|
+
});
|
|
173703
|
+
|
|
173704
|
+
// src/cli/integrations/addPlugin.ts
|
|
173705
|
+
import { existsSync as existsSync21, readFileSync as readFileSync21 } from "fs";
|
|
173480
173706
|
import { join as join20 } from "path";
|
|
173707
|
+
var isRecord5 = (value) => typeof value === "object" && value !== null && !Array.isArray(value), readPackageJson = (cwd) => {
|
|
173708
|
+
const path = join20(cwd, "package.json");
|
|
173709
|
+
if (!existsSync21(path))
|
|
173710
|
+
return null;
|
|
173711
|
+
try {
|
|
173712
|
+
const parsed = JSON.parse(readFileSync21(path, "utf-8"));
|
|
173713
|
+
return isRecord5(parsed) ? parsed : null;
|
|
173714
|
+
} catch {
|
|
173715
|
+
return null;
|
|
173716
|
+
}
|
|
173717
|
+
}, addGroupKeys = (group, names) => {
|
|
173718
|
+
if (!isRecord5(group))
|
|
173719
|
+
return;
|
|
173720
|
+
for (const name of Object.keys(group))
|
|
173721
|
+
names.add(name);
|
|
173722
|
+
}, declaredDeps = (cwd) => {
|
|
173723
|
+
const names = new Set;
|
|
173724
|
+
const pkg = readPackageJson(cwd);
|
|
173725
|
+
if (!pkg)
|
|
173726
|
+
return names;
|
|
173727
|
+
for (const field of ["dependencies", "devDependencies"]) {
|
|
173728
|
+
addGroupKeys(pkg[field], names);
|
|
173729
|
+
}
|
|
173730
|
+
return names;
|
|
173731
|
+
}, snippetFor = (wiring) => wiring.kind === "use" ? `${wiring.importLine}
|
|
173732
|
+
${wiring.useLine}` : null, toItem = (meta, deps, current) => {
|
|
173733
|
+
const installed = meta.packages.every((pkg) => deps.has(pkg));
|
|
173734
|
+
const enabled = meta.wiring.kind === "config" ? current[meta.wiring.field] === true : installed;
|
|
173735
|
+
return {
|
|
173736
|
+
blurb: meta.blurb,
|
|
173737
|
+
enabled,
|
|
173738
|
+
id: meta.id,
|
|
173739
|
+
installed,
|
|
173740
|
+
kind: meta.wiring.kind,
|
|
173741
|
+
label: meta.label,
|
|
173742
|
+
note: meta.note ?? null,
|
|
173743
|
+
packages: meta.packages,
|
|
173744
|
+
wiringSnippet: snippetFor(meta.wiring)
|
|
173745
|
+
};
|
|
173746
|
+
}, resolveIntegrationsState = (cwd, override) => {
|
|
173747
|
+
const deps = declaredDeps(cwd);
|
|
173748
|
+
const { configPath: configPath2, current } = readAbsoluteConfigValues(cwd, override);
|
|
173749
|
+
return {
|
|
173750
|
+
configPath: configPath2,
|
|
173751
|
+
items: INTEGRATIONS.map((meta) => toItem(meta, deps, current))
|
|
173752
|
+
};
|
|
173753
|
+
}, baseMessage = (meta, willInstall, installOk) => {
|
|
173754
|
+
if (!installOk) {
|
|
173755
|
+
return `Couldn't install ${meta.packages.join(", ")} \u2014 run \`bun add\` manually.`;
|
|
173756
|
+
}
|
|
173757
|
+
if (willInstall)
|
|
173758
|
+
return `Installed ${meta.label}.`;
|
|
173759
|
+
if (meta.packages.length > 0) {
|
|
173760
|
+
return `Skipped install (--no-install) for ${meta.label}.`;
|
|
173761
|
+
}
|
|
173762
|
+
return `${meta.label} is built in \u2014 no install needed.`;
|
|
173763
|
+
}, failure = (message) => ({
|
|
173764
|
+
installed: false,
|
|
173765
|
+
item: null,
|
|
173766
|
+
message,
|
|
173767
|
+
ok: false,
|
|
173768
|
+
wired: false,
|
|
173769
|
+
wiringSnippet: null
|
|
173770
|
+
}), addIntegration = (cwd, id, options = {}) => {
|
|
173771
|
+
const meta = findIntegration(id);
|
|
173772
|
+
if (!meta)
|
|
173773
|
+
return failure(`Unknown integration "${id}".`);
|
|
173774
|
+
const install = options.install ?? true;
|
|
173775
|
+
const willInstall = install && meta.packages.length > 0;
|
|
173776
|
+
const installOk = willInstall ? installPackages(cwd, meta.packages) : true;
|
|
173777
|
+
const { configPath: configPath2 } = readAbsoluteConfigValues(cwd, options.override);
|
|
173778
|
+
let wired = false;
|
|
173779
|
+
let message = baseMessage(meta, willInstall, installOk);
|
|
173780
|
+
if (meta.wiring.kind === "config") {
|
|
173781
|
+
if (!configPath2)
|
|
173782
|
+
return failure("No absolute.config.ts found.");
|
|
173783
|
+
const edit = applyAbsoluteConfigEdit(configPath2, {
|
|
173784
|
+
name: meta.wiring.field,
|
|
173785
|
+
value: true
|
|
173786
|
+
});
|
|
173787
|
+
wired = edit.ok;
|
|
173788
|
+
message = edit.ok ? `Enabled ${meta.label} in absolute.config.ts.` : `Installed, but couldn't edit config: ${edit.message}`;
|
|
173789
|
+
}
|
|
173790
|
+
const state = resolveIntegrationsState(cwd, options.override);
|
|
173791
|
+
const item = state.items.find((entry) => entry.id === id) ?? null;
|
|
173792
|
+
return {
|
|
173793
|
+
installed: item?.installed ?? installOk,
|
|
173794
|
+
item,
|
|
173795
|
+
message,
|
|
173796
|
+
ok: true,
|
|
173797
|
+
wired,
|
|
173798
|
+
wiringSnippet: item?.wiringSnippet ?? snippetFor(meta.wiring)
|
|
173799
|
+
};
|
|
173800
|
+
};
|
|
173801
|
+
var init_addPlugin = __esm(() => {
|
|
173802
|
+
init_dependencies();
|
|
173803
|
+
init_editAbsoluteConfig();
|
|
173804
|
+
init_resolveAbsoluteConfig();
|
|
173805
|
+
init_catalog();
|
|
173806
|
+
});
|
|
173807
|
+
|
|
173808
|
+
// src/cli/htmx/install.ts
|
|
173809
|
+
import { existsSync as existsSync22, mkdirSync as mkdirSync11, readFileSync as readFileSync22, writeFileSync as writeFileSync12 } from "fs";
|
|
173810
|
+
import { join as join21 } from "path";
|
|
173481
173811
|
var VENDORED_HTMX_VERSION = "2.0.6", vendoredHtmxFile = () => [
|
|
173482
|
-
|
|
173483
|
-
|
|
173484
|
-
|
|
173485
|
-
].find((path) =>
|
|
173812
|
+
join21(import.meta.dir, "htmx.min.js"),
|
|
173813
|
+
join21(import.meta.dir, "htmx", "htmx.min.js"),
|
|
173814
|
+
join21(import.meta.dir, "..", "htmx", "htmx.min.js")
|
|
173815
|
+
].find((path) => existsSync22(path)) ?? null, detectHtmxVersion = (content) => {
|
|
173486
173816
|
const match = content.match(/version:"([0-9.]+)"/);
|
|
173487
173817
|
return match ? match[1] : null;
|
|
173488
173818
|
}, fetchHtmx = async (version2) => {
|
|
@@ -173493,16 +173823,16 @@ var VENDORED_HTMX_VERSION = "2.0.6", vendoredHtmxFile = () => [
|
|
|
173493
173823
|
}
|
|
173494
173824
|
return response.text();
|
|
173495
173825
|
}, installedHtmxVersion = (htmxDir) => {
|
|
173496
|
-
const file =
|
|
173497
|
-
if (!
|
|
173826
|
+
const file = join21(htmxDir, "htmx.min.js");
|
|
173827
|
+
if (!existsSync22(file))
|
|
173498
173828
|
return null;
|
|
173499
|
-
return detectHtmxVersion(
|
|
173829
|
+
return detectHtmxVersion(readFileSync22(file, "utf-8"));
|
|
173500
173830
|
}, readVendoredHtmx = () => {
|
|
173501
173831
|
const file = vendoredHtmxFile();
|
|
173502
|
-
return file ?
|
|
173832
|
+
return file ? readFileSync22(file, "utf-8") : null;
|
|
173503
173833
|
}, writeHtmx = (htmxDir, content) => {
|
|
173504
173834
|
mkdirSync11(htmxDir, { recursive: true });
|
|
173505
|
-
const file =
|
|
173835
|
+
const file = join21(htmxDir, "htmx.min.js");
|
|
173506
173836
|
writeFileSync12(file, content, "utf-8");
|
|
173507
173837
|
return file;
|
|
173508
173838
|
};
|
|
@@ -173513,7 +173843,7 @@ var exports_add = {};
|
|
|
173513
173843
|
__export(exports_add, {
|
|
173514
173844
|
runAdd: () => runAdd
|
|
173515
173845
|
});
|
|
173516
|
-
import { dirname as dirname10, join as
|
|
173846
|
+
import { dirname as dirname10, join as join22, relative as relative6 } from "path";
|
|
173517
173847
|
var write2 = (text) => process.stdout.write(`${text}
|
|
173518
173848
|
`), fail2 = (message) => {
|
|
173519
173849
|
process.stdout.write(`${colors.red}${message}${colors.reset}
|
|
@@ -173528,12 +173858,32 @@ var write2 = (text) => process.stdout.write(`${text}
|
|
|
173528
173858
|
}, frontendRoot = (project, cwd) => {
|
|
173529
173859
|
const [firstKey] = configuredFrameworks(project);
|
|
173530
173860
|
const firstDir = firstKey ? project.frameworkDirs[firstKey] : undefined;
|
|
173531
|
-
return firstDir ? dirname10(firstDir) :
|
|
173861
|
+
return firstDir ? dirname10(firstDir) : join22(cwd, "src", "frontend");
|
|
173862
|
+
}, addIntegrationCli = (id, install) => {
|
|
173863
|
+
const result = addIntegration(process.cwd(), id, { install });
|
|
173864
|
+
if (!result.ok) {
|
|
173865
|
+
fail2(result.message);
|
|
173866
|
+
return;
|
|
173867
|
+
}
|
|
173868
|
+
write2(`${colors.green}\u2713${colors.reset} ${result.message}`);
|
|
173869
|
+
if (result.wiringSnippet) {
|
|
173870
|
+
write2(`
|
|
173871
|
+
${colors.dim}Add to your server${colors.reset}:`);
|
|
173872
|
+
for (const line of result.wiringSnippet.split(`
|
|
173873
|
+
`))
|
|
173874
|
+
write2(` ${line}`);
|
|
173875
|
+
}
|
|
173876
|
+
write2(`
|
|
173877
|
+
${colors.dim}Next${colors.reset} ${result.wired ? "run `absolute dev`" : "wire it in, then run `absolute dev`"}`);
|
|
173532
173878
|
}, runAdd = async (args) => {
|
|
173533
173879
|
const [framework] = args.filter((arg) => !arg.startsWith("--"));
|
|
173534
173880
|
const noInstall = args.includes("--no-install");
|
|
173881
|
+
if (framework && isIntegrationId(framework)) {
|
|
173882
|
+
addIntegrationCli(framework, !noInstall);
|
|
173883
|
+
return;
|
|
173884
|
+
}
|
|
173535
173885
|
if (!framework || !isFrameworkKey(framework)) {
|
|
173536
|
-
fail2("Usage: absolute add <react|svelte|vue|angular|html|htmx> [--no-install]");
|
|
173886
|
+
fail2("Usage: absolute add <react|svelte|vue|angular|html|htmx | openapi|telemetry|cors|jwt|cron> [--no-install]");
|
|
173537
173887
|
return;
|
|
173538
173888
|
}
|
|
173539
173889
|
const cwd = process.cwd();
|
|
@@ -173552,7 +173902,7 @@ var write2 = (text) => process.stdout.write(`${text}
|
|
|
173552
173902
|
write2(`${colors.yellow}!${colors.reset} ${frameworks2[framework].label} is already configured \u2014 nothing to do.`);
|
|
173553
173903
|
return;
|
|
173554
173904
|
}
|
|
173555
|
-
const dirAbs =
|
|
173905
|
+
const dirAbs = join22(frontendRoot(project, cwd), framework);
|
|
173556
173906
|
const dirRel = `./${relative6(cwd, dirAbs).split("\\").join("/")}`;
|
|
173557
173907
|
let depNote = "Skipped dependency install (--no-install).";
|
|
173558
173908
|
if (!noInstall) {
|
|
@@ -173610,6 +173960,8 @@ var init_add = __esm(() => {
|
|
|
173610
173960
|
init_frameworkKey();
|
|
173611
173961
|
init_frameworks();
|
|
173612
173962
|
init_dependencies();
|
|
173963
|
+
init_addPlugin();
|
|
173964
|
+
init_catalog();
|
|
173613
173965
|
init_install();
|
|
173614
173966
|
init_tuiPrimitives();
|
|
173615
173967
|
});
|
|
@@ -173619,8 +173971,8 @@ var exports_analyze = {};
|
|
|
173619
173971
|
__export(exports_analyze, {
|
|
173620
173972
|
runAnalyze: () => runAnalyze
|
|
173621
173973
|
});
|
|
173622
|
-
import { existsSync as
|
|
173623
|
-
import { join as
|
|
173974
|
+
import { existsSync as existsSync23, readFileSync as readFileSync23, statSync as statSync2, writeFileSync as writeFileSync13 } from "fs";
|
|
173975
|
+
import { join as join23, resolve as resolve13 } from "path";
|
|
173624
173976
|
var BASELINE_FILE = ".absolute-size-baseline.json", TOP_CHANGES = 12, CATEGORY_WIDTH = 16, SIZE_WIDTH = 12, CHANGE_WIDTH = 10, CATEGORY_ORDER, categoryOf = (key) => {
|
|
173625
173977
|
if (key.startsWith("Island"))
|
|
173626
173978
|
return "Islands";
|
|
@@ -173640,21 +173992,21 @@ var BASELINE_FILE = ".absolute-size-baseline.json", TOP_CHANGES = 12, CATEGORY_W
|
|
|
173640
173992
|
return 0;
|
|
173641
173993
|
}
|
|
173642
173994
|
}, readSizes = (manifestDir) => {
|
|
173643
|
-
const manifestPath =
|
|
173644
|
-
if (!
|
|
173995
|
+
const manifestPath = join23(manifestDir, "manifest.json");
|
|
173996
|
+
if (!existsSync23(manifestPath))
|
|
173645
173997
|
return null;
|
|
173646
|
-
const manifest = JSON.parse(
|
|
173998
|
+
const manifest = JSON.parse(readFileSync23(manifestPath, "utf-8"));
|
|
173647
173999
|
const sizes = {};
|
|
173648
174000
|
for (const [key, value] of Object.entries(manifest)) {
|
|
173649
|
-
sizes[key] = fileSize2(
|
|
174001
|
+
sizes[key] = fileSize2(join23(manifestDir, value.replace(/^\//, "")));
|
|
173650
174002
|
}
|
|
173651
174003
|
return sizes;
|
|
173652
174004
|
}, readBaseline = (cwd) => {
|
|
173653
|
-
const path =
|
|
173654
|
-
if (!
|
|
174005
|
+
const path = join23(cwd, BASELINE_FILE);
|
|
174006
|
+
if (!existsSync23(path))
|
|
173655
174007
|
return null;
|
|
173656
174008
|
try {
|
|
173657
|
-
const parsed = JSON.parse(
|
|
174009
|
+
const parsed = JSON.parse(readFileSync23(path, "utf-8"));
|
|
173658
174010
|
return parsed;
|
|
173659
174011
|
} catch {
|
|
173660
174012
|
return null;
|
|
@@ -173739,7 +174091,7 @@ var BASELINE_FILE = ".absolute-size-baseline.json", TOP_CHANGES = 12, CATEGORY_W
|
|
|
173739
174091
|
return;
|
|
173740
174092
|
}
|
|
173741
174093
|
if (args.includes("--save")) {
|
|
173742
|
-
writeFileSync13(
|
|
174094
|
+
writeFileSync13(join23(cwd, BASELINE_FILE), `${JSON.stringify(sizes, null, 2)}
|
|
173743
174095
|
`);
|
|
173744
174096
|
process.stdout.write(`${colors.green}\u2713${colors.reset} Saved size baseline (${Object.keys(sizes).length} entries) to ${BASELINE_FILE}
|
|
173745
174097
|
`);
|
|
@@ -173985,7 +174337,7 @@ var exports_remove = {};
|
|
|
173985
174337
|
__export(exports_remove, {
|
|
173986
174338
|
runRemove: () => runRemove
|
|
173987
174339
|
});
|
|
173988
|
-
import { existsSync as
|
|
174340
|
+
import { existsSync as existsSync24, readFileSync as readFileSync24 } from "fs";
|
|
173989
174341
|
import { relative as relative7 } from "path";
|
|
173990
174342
|
var write3 = (text) => process.stdout.write(`${text}
|
|
173991
174343
|
`), fail3 = (message) => {
|
|
@@ -173996,10 +174348,10 @@ var write3 = (text) => process.stdout.write(`${text}
|
|
|
173996
174348
|
const candidates = [findRoutingFile(serverEntry), serverEntry];
|
|
173997
174349
|
const seen = new Set;
|
|
173998
174350
|
return candidates.filter((file) => {
|
|
173999
|
-
if (file === null || seen.has(file) || !
|
|
174351
|
+
if (file === null || seen.has(file) || !existsSync24(file))
|
|
174000
174352
|
return false;
|
|
174001
174353
|
seen.add(file);
|
|
174002
|
-
return
|
|
174354
|
+
return readFileSync24(file, "utf-8").includes(handler);
|
|
174003
174355
|
});
|
|
174004
174356
|
}, runRemove = async (args) => {
|
|
174005
174357
|
const [framework] = args.filter((arg) => !arg.startsWith("--"));
|
|
@@ -174126,15 +174478,15 @@ __export(exports_env, {
|
|
|
174126
174478
|
runEnv: () => runEnv,
|
|
174127
174479
|
collectEnvVars: () => collectEnvVars
|
|
174128
174480
|
});
|
|
174129
|
-
import { existsSync as
|
|
174130
|
-
import { join as
|
|
174481
|
+
import { existsSync as existsSync25, readFileSync as readFileSync25 } from "fs";
|
|
174482
|
+
import { join as join24 } from "path";
|
|
174131
174483
|
var {env: env3, Glob: Glob3 } = globalThis.Bun;
|
|
174132
|
-
var EXTENSIONS = "ts,tsx,js,jsx,mjs,cjs,svelte,vue", STATUS_WIDTH2, keysInFile = (text) => [...text.matchAll(/getEnv\(\s*['"]([^'"]+)['"]\s*\)/g)].map((match) => match[1]).filter((key) => key !== undefined), scanPatterns = () =>
|
|
174484
|
+
var EXTENSIONS = "ts,tsx,js,jsx,mjs,cjs,svelte,vue", STATUS_WIDTH2, keysInFile = (text) => [...text.matchAll(/getEnv\(\s*['"]([^'"]+)['"]\s*\)/g)].map((match) => match[1]).filter((key) => key !== undefined), scanPatterns = () => existsSync25(join24(process.cwd(), "src")) ? [`src/**/*.{${EXTENSIONS}}`] : [`*.{${EXTENSIONS}}`], scanEnvUsage = async () => {
|
|
174133
174485
|
const scans = scanPatterns().map((pattern) => Array.fromAsync(new Glob3(pattern).scan({ cwd: process.cwd() })));
|
|
174134
174486
|
const files = (await Promise.all(scans)).flat();
|
|
174135
174487
|
const usage = new Map;
|
|
174136
174488
|
files.forEach((file) => {
|
|
174137
|
-
keysInFile(
|
|
174489
|
+
keysInFile(readFileSync25(file, "utf-8")).forEach((key) => {
|
|
174138
174490
|
usage.set(key, [...usage.get(key) ?? [], file]);
|
|
174139
174491
|
});
|
|
174140
174492
|
});
|
|
@@ -174192,7 +174544,7 @@ __export(exports_logs, {
|
|
|
174192
174544
|
});
|
|
174193
174545
|
import {
|
|
174194
174546
|
closeSync as closeSync2,
|
|
174195
|
-
existsSync as
|
|
174547
|
+
existsSync as existsSync26,
|
|
174196
174548
|
openSync as openSync4,
|
|
174197
174549
|
readSync as readSync2,
|
|
174198
174550
|
statSync as statSync3,
|
|
@@ -174259,7 +174611,7 @@ var DEFAULT_LINES = 40, POLL_MS = 250, LINES_FLAG_SPAN = 2, readFrom = (path, st
|
|
|
174259
174611
|
printAvailable(instances);
|
|
174260
174612
|
return;
|
|
174261
174613
|
}
|
|
174262
|
-
if (match.logFile === null || !
|
|
174614
|
+
if (match.logFile === null || !existsSync26(match.logFile)) {
|
|
174263
174615
|
printDim3(`"${name}" has no captured log (untracked, or started outside the CLI).`);
|
|
174264
174616
|
return;
|
|
174265
174617
|
}
|
|
@@ -174282,10 +174634,10 @@ var exports_doctor = {};
|
|
|
174282
174634
|
__export(exports_doctor, {
|
|
174283
174635
|
runDoctor: () => runDoctor
|
|
174284
174636
|
});
|
|
174285
|
-
import { existsSync as
|
|
174637
|
+
import { existsSync as existsSync27, mkdirSync as mkdirSync12, readFileSync as readFileSync26, writeFileSync as writeFileSync14 } from "fs";
|
|
174286
174638
|
import { createRequire } from "module";
|
|
174287
174639
|
import { arch as arch4, platform as platform5 } from "os";
|
|
174288
|
-
import { join as
|
|
174640
|
+
import { join as join25 } from "path";
|
|
174289
174641
|
var FRAMEWORK_FIELDS2, projectRequire, check = (status2, label, detail) => ({
|
|
174290
174642
|
detail,
|
|
174291
174643
|
label,
|
|
@@ -174320,7 +174672,7 @@ var FRAMEWORK_FIELDS2, projectRequire, check = (status2, label, detail) => ({
|
|
|
174320
174672
|
return [];
|
|
174321
174673
|
const label = `${field.replace("Directory", "")} pages`;
|
|
174322
174674
|
return [
|
|
174323
|
-
|
|
174675
|
+
existsSync27(join25(process.cwd(), dir)) ? check("ok", label, dir) : check("fail", label, `${dir} (missing)`)
|
|
174324
174676
|
];
|
|
174325
174677
|
}), envCheck = async () => {
|
|
174326
174678
|
const vars = await collectEnvVars();
|
|
@@ -174370,9 +174722,9 @@ ${colors.dim}${checks.length} checks \xB7 ${colors.reset}${summary}${colors.dim}
|
|
|
174370
174722
|
const fixes = [];
|
|
174371
174723
|
for (const field of FRAMEWORK_FIELDS2) {
|
|
174372
174724
|
const dir = readString(config, field);
|
|
174373
|
-
if (dir === undefined ||
|
|
174725
|
+
if (dir === undefined || existsSync27(join25(cwd, dir)))
|
|
174374
174726
|
continue;
|
|
174375
|
-
mkdirSync12(
|
|
174727
|
+
mkdirSync12(join25(cwd, dir, "pages"), { recursive: true });
|
|
174376
174728
|
fixes.push(`created ${dir}/pages`);
|
|
174377
174729
|
}
|
|
174378
174730
|
return fixes;
|
|
@@ -174380,8 +174732,8 @@ ${colors.dim}${checks.length} checks \xB7 ${colors.reset}${summary}${colors.dim}
|
|
|
174380
174732
|
const missing = (await collectEnvVars()).filter((entry) => !entry.set);
|
|
174381
174733
|
if (missing.length === 0)
|
|
174382
174734
|
return null;
|
|
174383
|
-
const envExample =
|
|
174384
|
-
const existing =
|
|
174735
|
+
const envExample = join25(cwd, ".env.example");
|
|
174736
|
+
const existing = existsSync27(envExample) ? readFileSync26(envExample, "utf-8") : "";
|
|
174385
174737
|
const existingKeys = new Set(existing.split(`
|
|
174386
174738
|
`).map((line) => line.split("=")[0]?.trim()));
|
|
174387
174739
|
const toAdd = missing.filter((entry) => !existingKeys.has(entry.key));
|
|
@@ -174436,7 +174788,7 @@ var init_doctor = __esm(() => {
|
|
|
174436
174788
|
"htmlDirectory",
|
|
174437
174789
|
"htmxDirectory"
|
|
174438
174790
|
];
|
|
174439
|
-
projectRequire = createRequire(
|
|
174791
|
+
projectRequire = createRequire(join25(process.cwd(), "package.json"));
|
|
174440
174792
|
STATUS_MARK = {
|
|
174441
174793
|
fail: `${colors.red}\u2717${colors.reset}`,
|
|
174442
174794
|
ok: `${colors.green}\u2713${colors.reset}`,
|
|
@@ -174740,10 +175092,10 @@ var init_inspect = __esm(() => {
|
|
|
174740
175092
|
});
|
|
174741
175093
|
|
|
174742
175094
|
// src/build/scanEntryPoints.ts
|
|
174743
|
-
import { existsSync as
|
|
175095
|
+
import { existsSync as existsSync28 } from "fs";
|
|
174744
175096
|
var {Glob: Glob4 } = globalThis.Bun;
|
|
174745
175097
|
var scanEntryPoints = async (dir, pattern) => {
|
|
174746
|
-
if (!
|
|
175098
|
+
if (!existsSync28(dir))
|
|
174747
175099
|
return [];
|
|
174748
175100
|
const entryPaths = [];
|
|
174749
175101
|
const glob = new Glob4(pattern);
|
|
@@ -174825,7 +175177,7 @@ var init_sourceMetadata = __esm(() => {
|
|
|
174825
175177
|
});
|
|
174826
175178
|
|
|
174827
175179
|
// src/islands/pageMetadata.ts
|
|
174828
|
-
import { readFileSync as
|
|
175180
|
+
import { readFileSync as readFileSync27 } from "fs";
|
|
174829
175181
|
import { dirname as dirname11, resolve as resolve14 } from "path";
|
|
174830
175182
|
var pagePatterns, getPageDirs = (config) => [
|
|
174831
175183
|
{ dir: config.angularDirectory, framework: "angular" },
|
|
@@ -174862,7 +175214,7 @@ var pagePatterns, getPageDirs = (config) => [
|
|
|
174862
175214
|
return;
|
|
174863
175215
|
const files = await scanEntryPoints(resolve14(entry.dir), pattern);
|
|
174864
175216
|
for (const filePath of files) {
|
|
174865
|
-
const source =
|
|
175217
|
+
const source = readFileSync27(filePath, "utf-8");
|
|
174866
175218
|
const islands = extractIslandUsagesFromSource(source);
|
|
174867
175219
|
pageMetadata.set(resolve14(filePath), {
|
|
174868
175220
|
islands: resolveIslandUsages(islands, islandSourceLookup),
|
|
@@ -174895,8 +175247,8 @@ var exports_islands = {};
|
|
|
174895
175247
|
__export(exports_islands, {
|
|
174896
175248
|
runIslands: () => runIslands
|
|
174897
175249
|
});
|
|
174898
|
-
import { existsSync as
|
|
174899
|
-
import { join as
|
|
175250
|
+
import { existsSync as existsSync29, readFileSync as readFileSync28, statSync as statSync4 } from "fs";
|
|
175251
|
+
import { join as join26, relative as relative8, resolve as resolve15 } from "path";
|
|
174900
175252
|
var FRAMEWORK_DIR_KEY, FRAMEWORK_COLOR, printDim6 = (message) => process.stdout.write(`${colors.dim}${message}${colors.reset}
|
|
174901
175253
|
`), hostFrameworkOf = (pagePath, cwd, config) => {
|
|
174902
175254
|
const resolved = resolve15(cwd, pagePath);
|
|
@@ -174914,13 +175266,13 @@ var FRAMEWORK_DIR_KEY, FRAMEWORK_COLOR, printDim6 = (message) => process.stdout.
|
|
|
174914
175266
|
return 0;
|
|
174915
175267
|
}
|
|
174916
175268
|
}, readManifestSizes2 = (manifestDir) => {
|
|
174917
|
-
const manifestPath =
|
|
174918
|
-
if (!
|
|
175269
|
+
const manifestPath = join26(manifestDir, "manifest.json");
|
|
175270
|
+
if (!existsSync29(manifestPath))
|
|
174919
175271
|
return null;
|
|
174920
|
-
const manifest = JSON.parse(
|
|
175272
|
+
const manifest = JSON.parse(readFileSync28(manifestPath, "utf-8"));
|
|
174921
175273
|
const sizes = new Map;
|
|
174922
175274
|
for (const [key, value] of Object.entries(manifest)) {
|
|
174923
|
-
sizes.set(key, fileSize3(
|
|
175275
|
+
sizes.set(key, fileSize3(join26(manifestDir, value.replace(/^\//, ""))));
|
|
174924
175276
|
}
|
|
174925
175277
|
return sizes;
|
|
174926
175278
|
}, collectIslands = async (cwd, config, sizes) => {
|
|
@@ -175055,8 +175407,8 @@ var init_islands2 = __esm(() => {
|
|
|
175055
175407
|
});
|
|
175056
175408
|
|
|
175057
175409
|
// src/build/externalAssetPlugin.ts
|
|
175058
|
-
import { copyFileSync as copyFileSync2, existsSync as
|
|
175059
|
-
import { basename as basename6, dirname as dirname12, join as
|
|
175410
|
+
import { copyFileSync as copyFileSync2, existsSync as existsSync30, mkdirSync as mkdirSync13, statSync as statSync5 } from "fs";
|
|
175411
|
+
import { basename as basename6, dirname as dirname12, join as join27, resolve as resolve16 } from "path";
|
|
175060
175412
|
var createExternalAssetPlugin = (outDir, userSourceRoots = []) => ({
|
|
175061
175413
|
name: "absolute-external-asset",
|
|
175062
175414
|
setup(bld) {
|
|
@@ -175077,12 +175429,12 @@ var createExternalAssetPlugin = (outDir, userSourceRoots = []) => ({
|
|
|
175077
175429
|
if (!relPath)
|
|
175078
175430
|
continue;
|
|
175079
175431
|
const assetPath = resolve16(sourceDir, relPath);
|
|
175080
|
-
if (!
|
|
175432
|
+
if (!existsSync30(assetPath))
|
|
175081
175433
|
continue;
|
|
175082
175434
|
if (!statSync5(assetPath).isFile())
|
|
175083
175435
|
continue;
|
|
175084
|
-
const targetPath =
|
|
175085
|
-
if (
|
|
175436
|
+
const targetPath = join27(outDir, basename6(assetPath));
|
|
175437
|
+
if (existsSync30(targetPath))
|
|
175086
175438
|
continue;
|
|
175087
175439
|
mkdirSync13(dirname12(targetPath), { recursive: true });
|
|
175088
175440
|
copyFileSync2(assetPath, targetPath);
|
|
@@ -175102,16 +175454,16 @@ __export(exports_compile, {
|
|
|
175102
175454
|
var {env: env4 } = globalThis.Bun;
|
|
175103
175455
|
import {
|
|
175104
175456
|
cpSync,
|
|
175105
|
-
existsSync as
|
|
175457
|
+
existsSync as existsSync31,
|
|
175106
175458
|
mkdirSync as mkdirSync14,
|
|
175107
175459
|
readdirSync as readdirSync6,
|
|
175108
|
-
readFileSync as
|
|
175460
|
+
readFileSync as readFileSync29,
|
|
175109
175461
|
rmSync as rmSync5,
|
|
175110
175462
|
statSync as statSync6,
|
|
175111
175463
|
unlinkSync as unlinkSync4,
|
|
175112
175464
|
writeFileSync as writeFileSync15
|
|
175113
175465
|
} from "fs";
|
|
175114
|
-
import { basename as basename7, dirname as dirname13, join as
|
|
175466
|
+
import { basename as basename7, dirname as dirname13, join as join28, relative as relative9, resolve as resolve17 } from "path";
|
|
175115
175467
|
var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[cli]\x1B[0m ${color}${message}\x1B[0m`, compileBanner = (version2) => {
|
|
175116
175468
|
const resolvedVersion = version2 || "unknown";
|
|
175117
175469
|
console.log("");
|
|
@@ -175124,7 +175476,7 @@ var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[c
|
|
|
175124
175476
|
const entry = pending.pop();
|
|
175125
175477
|
if (!entry)
|
|
175126
175478
|
continue;
|
|
175127
|
-
const fullPath =
|
|
175479
|
+
const fullPath = join28(entry.parentPath, entry.name);
|
|
175128
175480
|
if (entry.isDirectory())
|
|
175129
175481
|
pending = pending.concat(readdirSync6(fullPath, { withFileTypes: true }));
|
|
175130
175482
|
else
|
|
@@ -175144,7 +175496,7 @@ var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[c
|
|
|
175144
175496
|
const entry = pending.pop();
|
|
175145
175497
|
if (!entry)
|
|
175146
175498
|
continue;
|
|
175147
|
-
const fullPath =
|
|
175499
|
+
const fullPath = join28(entry.parentPath, entry.name);
|
|
175148
175500
|
if (entry.isDirectory()) {
|
|
175149
175501
|
if (SERVER_RUNTIME_SCAN_SKIP_DIRS.has(entry.name))
|
|
175150
175502
|
continue;
|
|
@@ -175159,7 +175511,7 @@ var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[c
|
|
|
175159
175511
|
const normalizedOutdir = resolve17(outdir);
|
|
175160
175512
|
const copyReference = (filePath, relPath) => {
|
|
175161
175513
|
const assetSource = resolve17(dirname13(filePath), relPath);
|
|
175162
|
-
if (!
|
|
175514
|
+
if (!existsSync31(assetSource) || !statSync6(assetSource).isFile())
|
|
175163
175515
|
return;
|
|
175164
175516
|
const assetTarget = resolve17(normalizedOutdir, relPath.replace(/^\.\//, ""));
|
|
175165
175517
|
if (assetTarget !== normalizedOutdir && !assetTarget.startsWith(`${normalizedOutdir}/`))
|
|
@@ -175171,7 +175523,7 @@ var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[c
|
|
|
175171
175523
|
cpSync(assetSource, assetTarget, { force: true });
|
|
175172
175524
|
};
|
|
175173
175525
|
for (const filePath of collectProjectSourceFiles(process.cwd())) {
|
|
175174
|
-
const source =
|
|
175526
|
+
const source = readFileSync29(filePath, "utf-8");
|
|
175175
175527
|
SERVER_RUNTIME_ASSET_RE.lastIndex = 0;
|
|
175176
175528
|
let match;
|
|
175177
175529
|
while ((match = SERVER_RUNTIME_ASSET_RE.exec(source)) !== null) {
|
|
@@ -175200,7 +175552,7 @@ var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[c
|
|
|
175200
175552
|
}
|
|
175201
175553
|
}, readPackageVersion4 = (candidate) => {
|
|
175202
175554
|
try {
|
|
175203
|
-
const pkg = JSON.parse(
|
|
175555
|
+
const pkg = JSON.parse(readFileSync29(candidate, "utf-8"));
|
|
175204
175556
|
if (pkg.name !== "@absolutejs/absolute")
|
|
175205
175557
|
return null;
|
|
175206
175558
|
const ver = pkg.version;
|
|
@@ -175243,7 +175595,7 @@ var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[c
|
|
|
175243
175595
|
resolve17(import.meta.dir, "..", "..", "..", "src", "react", "jsxDevRuntimeCompat.ts")
|
|
175244
175596
|
];
|
|
175245
175597
|
for (const candidate of candidates) {
|
|
175246
|
-
if (
|
|
175598
|
+
if (existsSync31(candidate))
|
|
175247
175599
|
return candidate;
|
|
175248
175600
|
}
|
|
175249
175601
|
return resolve17(import.meta.dir, "..", "..", "react", "jsxDevRuntimeCompat.js");
|
|
@@ -175259,7 +175611,7 @@ var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[c
|
|
|
175259
175611
|
return true;
|
|
175260
175612
|
}, tryReadNodePackageJson = (packageDir) => {
|
|
175261
175613
|
try {
|
|
175262
|
-
return JSON.parse(
|
|
175614
|
+
return JSON.parse(readFileSync29(join28(packageDir, "package.json"), "utf-8"));
|
|
175263
175615
|
} catch {
|
|
175264
175616
|
return null;
|
|
175265
175617
|
}
|
|
@@ -175271,7 +175623,7 @@ var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[c
|
|
|
175271
175623
|
if (!pkg)
|
|
175272
175624
|
return;
|
|
175273
175625
|
seen.add(specifier);
|
|
175274
|
-
const destDir =
|
|
175626
|
+
const destDir = join28(outdir, "node_modules", ...specifier.split("/"));
|
|
175275
175627
|
rmSync5(destDir, { force: true, recursive: true });
|
|
175276
175628
|
cpSync(srcDir, destDir, {
|
|
175277
175629
|
force: true,
|
|
@@ -175294,7 +175646,7 @@ var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[c
|
|
|
175294
175646
|
if (!buildConfig.angularDirectory)
|
|
175295
175647
|
return;
|
|
175296
175648
|
const angularScopeDir = resolve17(process.cwd(), "node_modules", "@angular");
|
|
175297
|
-
const angularPackages =
|
|
175649
|
+
const angularPackages = existsSync31(angularScopeDir) ? readdirSync6(angularScopeDir, { withFileTypes: true }).filter((entry) => entry.isDirectory()).filter((entry) => entry.name !== "compiler-cli").map((entry) => `@angular/${entry.name}`) : [];
|
|
175298
175650
|
const roots = new Set([...angularPackages, "rxjs", "tslib", "typescript"]);
|
|
175299
175651
|
const seen = new Set;
|
|
175300
175652
|
for (const specifier of roots) {
|
|
@@ -175312,15 +175664,15 @@ var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[c
|
|
|
175312
175664
|
copyAngularRuntimePackages(buildConfig, outdir);
|
|
175313
175665
|
copyChunkReferencedPackages(outdir, seen);
|
|
175314
175666
|
}, collectRuntimePackageSpecifiers = (distDir) => {
|
|
175315
|
-
const nodeModulesDir =
|
|
175316
|
-
if (!
|
|
175667
|
+
const nodeModulesDir = join28(distDir, "node_modules");
|
|
175668
|
+
if (!existsSync31(nodeModulesDir))
|
|
175317
175669
|
return [];
|
|
175318
175670
|
const specifiers = [];
|
|
175319
175671
|
for (const entry of readdirSync6(nodeModulesDir, { withFileTypes: true })) {
|
|
175320
175672
|
if (!entry.isDirectory())
|
|
175321
175673
|
continue;
|
|
175322
175674
|
if (entry.name.startsWith("@")) {
|
|
175323
|
-
const scopeDir =
|
|
175675
|
+
const scopeDir = join28(nodeModulesDir, entry.name);
|
|
175324
175676
|
for (const scopedEntry of readdirSync6(scopeDir, {
|
|
175325
175677
|
withFileTypes: true
|
|
175326
175678
|
})) {
|
|
@@ -175352,18 +175704,18 @@ var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[c
|
|
|
175352
175704
|
const packageSpecifier = packageSpecifiers.find((root) => specifier === root || specifier.startsWith(`${root}/`));
|
|
175353
175705
|
if (!packageSpecifier)
|
|
175354
175706
|
return null;
|
|
175355
|
-
const packageDir =
|
|
175707
|
+
const packageDir = join28(distDir, "node_modules", ...packageSpecifier.split("/"));
|
|
175356
175708
|
const subpath = specifier.slice(packageSpecifier.length);
|
|
175357
|
-
const subPackageDir = subpath ?
|
|
175358
|
-
const resolvedPackageDir = subPackageDir &&
|
|
175359
|
-
const packageJsonPath =
|
|
175360
|
-
if (!
|
|
175709
|
+
const subPackageDir = subpath ? join28(packageDir, ...subpath.slice(1).split("/")) : null;
|
|
175710
|
+
const resolvedPackageDir = subPackageDir && existsSync31(join28(subPackageDir, "package.json")) ? subPackageDir : packageDir;
|
|
175711
|
+
const packageJsonPath = join28(resolvedPackageDir, "package.json");
|
|
175712
|
+
if (!existsSync31(packageJsonPath))
|
|
175361
175713
|
return null;
|
|
175362
|
-
const pkg = JSON.parse(
|
|
175714
|
+
const pkg = JSON.parse(readFileSync29(packageJsonPath, "utf-8"));
|
|
175363
175715
|
const exportKey = resolvedPackageDir !== subPackageDir && subpath ? `.${subpath}` : ".";
|
|
175364
175716
|
const rootExport = pkg.exports?.[exportKey];
|
|
175365
175717
|
const entry = pickExportEntry(rootExport) ?? (resolvedPackageDir === subPackageDir || !subpath ? pkg.module ?? pkg.main ?? "index.js" : `.${subpath}`);
|
|
175366
|
-
return
|
|
175718
|
+
return join28(resolvedPackageDir, entry);
|
|
175367
175719
|
}, RUNTIME_JS_EXTENSIONS, MODULE_SPECIFIER_RE, isRuntimeJsFile = (filePath) => RUNTIME_JS_EXTENSIONS.some((extension) => filePath.endsWith(extension)), isNodeModulesPath = (filePath) => filePath.split(/[\\/]/).includes("node_modules"), isFile = (filePath) => {
|
|
175368
175720
|
try {
|
|
175369
175721
|
return statSync6(filePath).isFile();
|
|
@@ -175376,13 +175728,13 @@ var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[c
|
|
|
175376
175728
|
const candidates = [
|
|
175377
175729
|
candidate,
|
|
175378
175730
|
...RUNTIME_JS_EXTENSIONS.map((extension) => `${candidate}${extension}`),
|
|
175379
|
-
...RUNTIME_JS_EXTENSIONS.map((extension) =>
|
|
175731
|
+
...RUNTIME_JS_EXTENSIONS.map((extension) => join28(candidate, `index${extension}`))
|
|
175380
175732
|
];
|
|
175381
175733
|
return candidates.find((filePath) => isRuntimeJsFile(filePath) && isFile(filePath)) ?? null;
|
|
175382
175734
|
}, findContainingRuntimePackageDir = (filePath) => {
|
|
175383
175735
|
let dir = dirname13(filePath);
|
|
175384
175736
|
while (dir !== dirname13(dir)) {
|
|
175385
|
-
if (isNodeModulesPath(dir) &&
|
|
175737
|
+
if (isNodeModulesPath(dir) && existsSync31(join28(dir, "package.json"))) {
|
|
175386
175738
|
return dir;
|
|
175387
175739
|
}
|
|
175388
175740
|
dir = dirname13(dir);
|
|
@@ -175398,13 +175750,13 @@ var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[c
|
|
|
175398
175750
|
const entry = pickExportEntry(pkg?.imports?.[specifier]);
|
|
175399
175751
|
if (!entry)
|
|
175400
175752
|
return null;
|
|
175401
|
-
return
|
|
175753
|
+
return join28(packageDir, entry);
|
|
175402
175754
|
}, collectRuntimeRewriteRoots = (distDir) => collectFiles2(distDir).filter((filePath) => isRuntimeJsFile(filePath) && !isNodeModulesPath(filePath)), toTopLevelPackage = (specifier) => specifier.split("/").slice(0, specifier.startsWith("@") ? 2 : 1).join("/"), FRAMEWORK_PACKAGE_NAME = "@absolutejs/absolute", copyChunkReferencedPackages = (distDir, seen) => {
|
|
175403
175755
|
const distRoot = resolve17(distDir);
|
|
175404
175756
|
for (const filePath of collectRuntimeRewriteRoots(distDir)) {
|
|
175405
175757
|
if (resolve17(dirname13(filePath)) === distRoot)
|
|
175406
175758
|
continue;
|
|
175407
|
-
const source =
|
|
175759
|
+
const source = readFileSync29(filePath, "utf-8");
|
|
175408
175760
|
for (const match of source.matchAll(MODULE_SPECIFIER_RE)) {
|
|
175409
175761
|
const specifier = match[3];
|
|
175410
175762
|
if (!specifier || specifier.startsWith(".") || specifier.startsWith("/") || specifier.startsWith("#") || specifier.startsWith("node:") || specifier.startsWith("bun:")) {
|
|
@@ -175434,7 +175786,7 @@ var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[c
|
|
|
175434
175786
|
if (!filePath || seen.has(filePath))
|
|
175435
175787
|
continue;
|
|
175436
175788
|
seen.add(filePath);
|
|
175437
|
-
const source =
|
|
175789
|
+
const source = readFileSync29(filePath, "utf-8");
|
|
175438
175790
|
const rewritten = source.replace(MODULE_SPECIFIER_RE, (match, prefix, quote, specifier) => {
|
|
175439
175791
|
if (typeof specifier === "string" && specifier.startsWith(".")) {
|
|
175440
175792
|
enqueue(resolveRuntimeJsFile(resolve17(dirname13(filePath), specifier)));
|
|
@@ -175878,8 +176230,7 @@ console.log(\`
|
|
|
175878
176230
|
if (normalizedPath.includes("/src/angular/"))
|
|
175879
176231
|
return;
|
|
175880
176232
|
const text = await Bun.file(args.path).text();
|
|
175881
|
-
|
|
175882
|
-
if (stripped.includes("@Component")) {
|
|
176233
|
+
if (text.includes("@Component") && stripStringsAndComments(text).includes("@Component")) {
|
|
175883
176234
|
return { contents: "export default {}", loader: "js" };
|
|
175884
176235
|
}
|
|
175885
176236
|
return;
|
|
@@ -175972,11 +176323,11 @@ console.log(\`
|
|
|
175972
176323
|
process.exit(1);
|
|
175973
176324
|
}
|
|
175974
176325
|
const outputPath = resolve17(resolvedOutdir, `${entryName}.js`);
|
|
175975
|
-
if (!
|
|
176326
|
+
if (!existsSync31(outputPath)) {
|
|
175976
176327
|
console.error(cliTag4("\x1B[31m", `Expected output not found: ${outputPath}`));
|
|
175977
176328
|
process.exit(1);
|
|
175978
176329
|
}
|
|
175979
|
-
if (
|
|
176330
|
+
if (existsSync31(resolve17(resolvedOutdir, "angular", "vendor", "server"))) {
|
|
175980
176331
|
const vendorDir = resolve17(resolvedOutdir, "angular", "vendor", "server");
|
|
175981
176332
|
const vendorEntries = readdirSync6(vendorDir).filter((f) => f.endsWith(".js"));
|
|
175982
176333
|
const angularServerVendorPaths = {};
|
|
@@ -175998,7 +176349,7 @@ console.log(\`
|
|
|
175998
176349
|
copyServerRuntimeAssetReferences(resolvedOutdir);
|
|
175999
176350
|
const prerenderStart = performance.now();
|
|
176000
176351
|
process.stdout.write(cliTag4("\x1B[36m", "Pre-rendering pages"));
|
|
176001
|
-
rmSync5(
|
|
176352
|
+
rmSync5(join28(resolvedOutdir, "_prerendered"), {
|
|
176002
176353
|
force: true,
|
|
176003
176354
|
recursive: true
|
|
176004
176355
|
});
|
|
@@ -176017,7 +176368,7 @@ console.log(\`
|
|
|
176017
176368
|
const compileStart = performance.now();
|
|
176018
176369
|
process.stdout.write(cliTag4("\x1B[36m", "Compiling standalone executable"));
|
|
176019
176370
|
const entrypointCode = generateEntrypoint(resolvedOutdir, serverEntry, prerenderMap, absoluteVersion, buildConfig);
|
|
176020
|
-
const entrypointPath =
|
|
176371
|
+
const entrypointPath = join28(resolvedOutdir, "_compile_entrypoint.ts");
|
|
176021
176372
|
await Bun.write(entrypointPath, entrypointCode);
|
|
176022
176373
|
mkdirSync14(dirname13(resolvedOutfile), { recursive: true });
|
|
176023
176374
|
const result = await Bun.build({
|
|
@@ -176113,11 +176464,11 @@ var exports_typecheck = {};
|
|
|
176113
176464
|
__export(exports_typecheck, {
|
|
176114
176465
|
typecheck: () => typecheck
|
|
176115
176466
|
});
|
|
176116
|
-
import { resolve as resolve18, join as
|
|
176117
|
-
import { existsSync as
|
|
176467
|
+
import { resolve as resolve18, join as join29 } from "path";
|
|
176468
|
+
import { existsSync as existsSync32, readFileSync as readFileSync30 } from "fs";
|
|
176118
176469
|
import { mkdir as mkdir2, writeFile } from "fs/promises";
|
|
176119
176470
|
var isCommandService3 = (service) => service.kind === "command" || Array.isArray(service.command), resolveConfigPath = (configPath2) => resolve18(configPath2 ?? process.env.ABSOLUTE_CONFIG ?? "absolute.config.ts"), getTypecheckTargets = async (configPath2) => {
|
|
176120
|
-
if (!
|
|
176471
|
+
if (!existsSync32(resolveConfigPath(configPath2))) {
|
|
176121
176472
|
return [{}];
|
|
176122
176473
|
}
|
|
176123
176474
|
const rawConfig = await loadRawConfig(configPath2);
|
|
@@ -176138,7 +176489,7 @@ var isCommandService3 = (service) => service.kind === "command" || Array.isArray
|
|
|
176138
176489
|
return { exitCode, name, output: (stdout + stderr).trim() };
|
|
176139
176490
|
}, shellEscape = (value) => `'${value.replaceAll("'", "'\\''")}'`, runShell = async (name, command) => run(name, ["/bin/bash", "-lc", command]), findBin = (name) => {
|
|
176140
176491
|
const local = resolve18("node_modules", ".bin", name);
|
|
176141
|
-
return
|
|
176492
|
+
return existsSync32(local) ? local : null;
|
|
176142
176493
|
}, ANSI_COLOR_REGEX, ANSI_PURPLE_REGEX, ANSI_CYAN_REGEX, ANSI_TOKEN_END_REGEX, stripAnsi3 = (str) => str.replace(ANSI_COLOR_REGEX, ""), formatSvelteOutput = (output) => {
|
|
176143
176494
|
const cwd = `${process.cwd()}/`;
|
|
176144
176495
|
const summaryMatch = stripAnsi3(output).match(/svelte-check found (\d+) error/);
|
|
@@ -176190,10 +176541,10 @@ Found ${errorCount} error${suffix}.`;
|
|
|
176190
176541
|
resolve18(import.meta.dir, "../../types", fileName),
|
|
176191
176542
|
resolve18(import.meta.dir, "../../../types", fileName)
|
|
176192
176543
|
];
|
|
176193
|
-
return candidates.find((candidate) =>
|
|
176544
|
+
return candidates.find((candidate) => existsSync32(candidate)) ?? candidates[0];
|
|
176194
176545
|
}, ABSOLUTE_TYPECHECK_FILES, readProjectTsconfig = () => {
|
|
176195
176546
|
try {
|
|
176196
|
-
return JSON.parse(
|
|
176547
|
+
return JSON.parse(readFileSync30(resolve18("tsconfig.json"), "utf-8"));
|
|
176197
176548
|
} catch {
|
|
176198
176549
|
return {};
|
|
176199
176550
|
}
|
|
@@ -176221,7 +176572,7 @@ Found ${errorCount} error${suffix}.`;
|
|
|
176221
176572
|
console.error("\x1B[31m\u2717\x1B[0m vue-tsc is required for Vue type checking. Install it: bun add -d vue-tsc");
|
|
176222
176573
|
process.exit(1);
|
|
176223
176574
|
}
|
|
176224
|
-
const vueTsconfigPath =
|
|
176575
|
+
const vueTsconfigPath = join29(cacheDir, "tsconfig.vue-check.json");
|
|
176225
176576
|
return writeFile(vueTsconfigPath, JSON.stringify({
|
|
176226
176577
|
compilerOptions: {
|
|
176227
176578
|
rootDir: ".."
|
|
@@ -176236,7 +176587,7 @@ Found ${errorCount} error${suffix}.`;
|
|
|
176236
176587
|
resolve18(vueTsconfigPath),
|
|
176237
176588
|
"--incremental",
|
|
176238
176589
|
"--tsBuildInfoFile",
|
|
176239
|
-
|
|
176590
|
+
join29(cacheDir, "vue-tsc.tsbuildinfo"),
|
|
176240
176591
|
"--pretty"
|
|
176241
176592
|
]));
|
|
176242
176593
|
}, buildAngularCheck = async (cacheDir, angularDir) => {
|
|
@@ -176245,7 +176596,7 @@ Found ${errorCount} error${suffix}.`;
|
|
|
176245
176596
|
console.error("\x1B[31m\u2717\x1B[0m @angular/compiler-cli is required for Angular type checking. Install it: bun add -d @angular/compiler-cli");
|
|
176246
176597
|
process.exit(1);
|
|
176247
176598
|
}
|
|
176248
|
-
const angularTsconfigPath =
|
|
176599
|
+
const angularTsconfigPath = join29(cacheDir, "tsconfig.angular-check.json");
|
|
176249
176600
|
await writeFile(angularTsconfigPath, JSON.stringify({
|
|
176250
176601
|
angularCompilerOptions: {
|
|
176251
176602
|
strictTemplates: true
|
|
@@ -176265,7 +176616,7 @@ Found ${errorCount} error${suffix}.`;
|
|
|
176265
176616
|
console.error("\x1B[31m\u2717\x1B[0m typescript is required for type checking. Install it: bun add -d typescript");
|
|
176266
176617
|
process.exit(1);
|
|
176267
176618
|
}
|
|
176268
|
-
const tscConfigPath =
|
|
176619
|
+
const tscConfigPath = join29(cacheDir, "tsconfig.typecheck.json");
|
|
176269
176620
|
return writeFile(tscConfigPath, JSON.stringify({
|
|
176270
176621
|
compilerOptions: {
|
|
176271
176622
|
rootDir: ".."
|
|
@@ -176280,7 +176631,7 @@ Found ${errorCount} error${suffix}.`;
|
|
|
176280
176631
|
resolve18(tscConfigPath),
|
|
176281
176632
|
"--incremental",
|
|
176282
176633
|
"--tsBuildInfoFile",
|
|
176283
|
-
|
|
176634
|
+
join29(cacheDir, "tsc.tsbuildinfo"),
|
|
176284
176635
|
"--pretty"
|
|
176285
176636
|
]));
|
|
176286
176637
|
}, buildSvelteCheck = async (cacheDir, svelteDir) => {
|
|
@@ -176289,7 +176640,7 @@ Found ${errorCount} error${suffix}.`;
|
|
|
176289
176640
|
console.error("\x1B[31m\u2717\x1B[0m svelte-check is required for Svelte type checking. Install it: bun add -d svelte-check");
|
|
176290
176641
|
process.exit(1);
|
|
176291
176642
|
}
|
|
176292
|
-
const svelteTsconfigPath =
|
|
176643
|
+
const svelteTsconfigPath = join29(cacheDir, "tsconfig.svelte-check.json");
|
|
176293
176644
|
await writeFile(svelteTsconfigPath, JSON.stringify({
|
|
176294
176645
|
extends: resolve18("tsconfig.json"),
|
|
176295
176646
|
files: ABSOLUTE_TYPECHECK_FILES,
|
|
@@ -178418,8 +178769,7 @@ var start = async (serverEntry, outdir, configPath2) => {
|
|
|
178418
178769
|
if (normalizedPath.includes("/src/angular/"))
|
|
178419
178770
|
return;
|
|
178420
178771
|
const text = await Bun.file(args.path).text();
|
|
178421
|
-
|
|
178422
|
-
if (stripped.includes("@Component")) {
|
|
178772
|
+
if (text.includes("@Component") && stripStringsAndComments(text).includes("@Component")) {
|
|
178423
178773
|
return {
|
|
178424
178774
|
contents: "export default {}",
|
|
178425
178775
|
loader: "js"
|