@absolutejs/absolute 0.20.0-beta.173 → 0.20.0-beta.175
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +30 -0
- package/changelog.json +71 -0
- package/dist/angular/browser.js +13 -2
- package/dist/angular/browser.js.map +3 -3
- package/dist/angular/components/core/streamingSlotRegistrar.js +1 -1
- package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
- package/dist/angular/index.js +113 -34
- package/dist/angular/index.js.map +12 -9
- package/dist/angular/server.js +113 -34
- package/dist/angular/server.js.map +12 -9
- package/dist/build.js +946 -731
- package/dist/build.js.map +40 -37
- package/dist/cli/{add-ae6mg79m.js → add-ntg96znk.js} +32 -31
- package/dist/cli/{compile-ndc36zna.js → compile-w2z6c9vt.js} +16 -14
- package/dist/cli/config/server.js +85 -65
- package/dist/cli/{dev-x49583aj.js → dev-8br5mr7t.js} +17 -3
- package/dist/cli/{expoProject-h404n2r8.js → expoProject-1qtw97js.js} +2 -1
- package/dist/cli/{generate-brvjesd6.js → generate-5vyz1s44.js} +7 -6
- package/dist/cli/{htmx-5twhjz7p.js → htmx-26hs6jdm.js} +2 -1
- package/dist/cli/{index-gyjxrnnz.js → index-23hvdyxf.js} +18 -16
- package/dist/cli/index-4j1twret.js +22 -0
- package/dist/cli/{index-z794p5qg.js → index-6522t968.js} +43 -21
- package/dist/cli/{index-25e7k849.js → index-7z1hh3fg.js} +4 -4
- package/dist/cli/{index-s0r5q839.js → index-cksezef8.js} +10 -8
- package/dist/cli/{index-q3snnhyd.js → index-enbw9484.js} +34 -33
- package/dist/cli/{index-b1wht4q5.js → index-kes8he5s.js} +6 -4
- package/dist/cli/{index-vh68jb0e.js → index-pkw3jktb.js} +17 -16
- package/dist/cli/{index-rervww4p.js → index-zyd80s3h.js} +119 -119
- package/dist/cli/index.js +11 -11
- package/dist/cli/{islands-p4vgx7a2.js → islands-bx67g15t.js} +8 -7
- package/dist/cli/{mobile-nqdkk3gd.js → mobile-we5q51ey.js} +5 -4
- package/dist/cli/{remove-abaf0w6k.js → remove-4jh862qa.js} +6 -5
- package/dist/cli/{start-t3cq57wn.js → start-srs11bm8.js} +5 -4
- package/dist/cli/{typecheck-fag7djt5.js → typecheck-7fvww3b7.js} +28 -26
- package/dist/client/chunks/index-4j1snyh2.js +18 -0
- package/dist/client/chunks/index-4j1snyh2.js.map +10 -0
- package/dist/client/chunks/{index-6b66nzyf.js → index-a3rpg5kw.js} +6 -16
- package/dist/client/chunks/{index-6b66nzyf.js.map → index-a3rpg5kw.js.map} +3 -4
- package/dist/client/chunks/{islands-s2ta5ajb.js → islands-mfjmdwnb.js} +11 -4
- package/dist/client/chunks/{islands-s2ta5ajb.js.map → islands-mfjmdwnb.js.map} +3 -3
- package/dist/client/chunks/{react-dcvkaba2.js → react-sprprqzs.js} +20 -4
- package/dist/client/chunks/react-sprprqzs.js.map +10 -0
- package/dist/client/chunks/svelte-6ewphsvj.js +30 -0
- package/dist/client/chunks/svelte-6ewphsvj.js.map +10 -0
- package/dist/client/chunks/{vue-a84fzp3v.js → vue-db6ppn1f.js} +14 -4
- package/dist/client/chunks/vue-db6ppn1f.js.map +10 -0
- package/dist/client/index.js +65 -8
- package/dist/client/index.js.map +4 -4
- package/dist/client/navigation.js +5 -3
- package/dist/client/navigation.js.map +2 -2
- package/dist/client/prefetch.js +1 -1
- package/dist/dev/client/handlers/islands.ts +85 -0
- package/dist/dev/client/hmrClient.ts +6 -0
- package/dist/dev/importCostReport.js +45 -26
- package/dist/index.js +1080 -852
- package/dist/index.js.map +41 -38
- package/dist/islands/index.js +57 -10
- package/dist/islands/index.js.map +9 -7
- package/dist/mobile/index.js +115 -95
- package/dist/mobile/index.js.map +6 -5
- package/dist/mobile/remoteMacAgentEntry.js +205 -651
- package/dist/react/browser.js +15 -4
- package/dist/react/browser.js.map +5 -5
- package/dist/react/components/client.js +506 -0
- package/dist/react/components/index.js +14 -15
- package/dist/react/components/index.js.map +4 -4
- package/dist/react/components/server/index.js +728 -0
- package/dist/react/hooks/index.js +14 -15
- package/dist/react/hooks/index.js.map +4 -4
- package/dist/react/index.js +66 -6
- package/dist/react/index.js.map +11 -9
- package/dist/react/router/browser.js +7 -8
- package/dist/react/router/browser.js.map +4 -4
- package/dist/react/router/index.js +7 -8
- package/dist/react/router/index.js.map +4 -4
- package/dist/react/server.js +14 -1
- package/dist/react/server.js.map +4 -4
- package/dist/src/build/buildReactServerComponents.d.ts +4 -0
- package/dist/src/build/islandEntries.d.ts +5 -0
- package/dist/src/cli/config/absolute/resolveAbsoluteConfig.d.ts +3 -3
- package/dist/src/cli/config/auth/resolveAuthSettings.d.ts +3 -3
- package/dist/src/client/hydrators/react.d.ts +7 -0
- package/dist/src/client/hydrators/svelte.d.ts +3 -0
- package/dist/src/client/hydrators/vue.d.ts +3 -0
- package/dist/src/client/preserveIslandMarkup.d.ts +5 -0
- package/dist/src/core/islandServerGeneration.d.ts +3 -0
- package/dist/src/dev/angular/fastHmrCompiler.d.ts +2 -2
- package/dist/src/dev/angular/hmrImportGenerator.d.ts +2 -2
- package/dist/src/dev/angular/vendor/translator/ts_util.d.ts +2 -2
- package/dist/src/dev/angular/vendor/translator/typescript_ast_factory.d.ts +40 -40
- package/dist/src/dev/angular/vendor/translator/typescript_translator.d.ts +3 -3
- package/dist/src/react/components/client.d.ts +4 -0
- package/dist/src/react/components/server/index.d.ts +8 -0
- package/dist/src/react/serverComponents/constants.d.ts +2 -1
- package/dist/src/utils/lazyTypescript.d.ts +3 -0
- package/dist/svelte/index.js +66 -6
- package/dist/svelte/index.js.map +10 -8
- package/dist/svelte/server.js +38 -3
- package/dist/svelte/server.js.map +6 -5
- package/dist/types/build.d.ts +3 -2
- package/dist/types/globals.d.ts +15 -0
- package/dist/vue/browser.js +26 -16
- package/dist/vue/browser.js.map +5 -5
- package/dist/vue/index.js +65 -21
- package/dist/vue/index.js.map +10 -9
- package/package.json +1 -1
- package/dist/client/chunks/react-dcvkaba2.js.map +0 -10
- package/dist/client/chunks/svelte-4yfa5bxa.js +0 -17
- package/dist/client/chunks/svelte-4yfa5bxa.js.map +0 -10
- package/dist/client/chunks/vue-a84fzp3v.js.map +0 -10
|
@@ -40351,13 +40351,32 @@ var init_editTsconfig = __esm(() => {
|
|
|
40351
40351
|
init_main();
|
|
40352
40352
|
});
|
|
40353
40353
|
|
|
40354
|
+
// src/utils/lazyTypescript.ts
|
|
40355
|
+
import { createRequire as createRequire2 } from "module";
|
|
40356
|
+
var loaded, loadTypescript = () => {
|
|
40357
|
+
if (loaded)
|
|
40358
|
+
return loaded;
|
|
40359
|
+
const requireFromHere = createRequire2(import.meta.url);
|
|
40360
|
+
const typescript = requireFromHere("typescript");
|
|
40361
|
+
loaded = typescript;
|
|
40362
|
+
return typescript;
|
|
40363
|
+
}, createLazyTypescript = () => {
|
|
40364
|
+
const target = Object.create(null);
|
|
40365
|
+
return new Proxy(target, {
|
|
40366
|
+
get: (_target, key) => Reflect.get(loadTypescript(), key),
|
|
40367
|
+
has: (_target, key) => Reflect.has(loadTypescript(), key)
|
|
40368
|
+
});
|
|
40369
|
+
}, lazyTypescript;
|
|
40370
|
+
var init_lazyTypescript = __esm(() => {
|
|
40371
|
+
lazyTypescript = createLazyTypescript();
|
|
40372
|
+
});
|
|
40373
|
+
|
|
40354
40374
|
// src/cli/config/tsconfig/resolveTsconfig.ts
|
|
40355
40375
|
var exports_resolveTsconfig = {};
|
|
40356
40376
|
__export(exports_resolveTsconfig, {
|
|
40357
40377
|
findTsconfigPath: () => findTsconfigPath,
|
|
40358
40378
|
resolveTsconfigState: () => resolveTsconfigState
|
|
40359
40379
|
});
|
|
40360
|
-
import ts from "typescript";
|
|
40361
40380
|
import { existsSync as existsSync4, readFileSync as readFileSync6 } from "fs";
|
|
40362
40381
|
import { resolve as resolve3 } from "path";
|
|
40363
40382
|
var CONFIG_CANDIDATES2, SKIP_CATEGORIES, findTsconfigPath = (cwd) => {
|
|
@@ -40368,7 +40387,7 @@ var CONFIG_CANDIDATES2, SKIP_CATEGORIES, findTsconfigPath = (cwd) => {
|
|
|
40368
40387
|
}
|
|
40369
40388
|
return null;
|
|
40370
40389
|
}, readCompilerOptions = (configPath) => {
|
|
40371
|
-
const parsed =
|
|
40390
|
+
const parsed = lazyTypescript.readConfigFile(configPath, (path) => {
|
|
40372
40391
|
try {
|
|
40373
40392
|
return readFileSync6(path, "utf-8");
|
|
40374
40393
|
} catch {
|
|
@@ -40411,7 +40430,7 @@ var CONFIG_CANDIDATES2, SKIP_CATEGORIES, findTsconfigPath = (cwd) => {
|
|
|
40411
40430
|
return messageOf(value);
|
|
40412
40431
|
return String(value);
|
|
40413
40432
|
}, buildOptions = () => {
|
|
40414
|
-
const raw = Reflect.get(
|
|
40433
|
+
const raw = Reflect.get(lazyTypescript, "optionDeclarations");
|
|
40415
40434
|
const declarations = Array.isArray(raw) ? raw : [];
|
|
40416
40435
|
const options = [];
|
|
40417
40436
|
for (const declaration of declarations) {
|
|
@@ -40446,6 +40465,7 @@ var CONFIG_CANDIDATES2, SKIP_CATEGORIES, findTsconfigPath = (cwd) => {
|
|
|
40446
40465
|
return { categories, configPath, current, options };
|
|
40447
40466
|
};
|
|
40448
40467
|
var init_resolveTsconfig = __esm(() => {
|
|
40468
|
+
init_lazyTypescript();
|
|
40449
40469
|
CONFIG_CANDIDATES2 = ["tsconfig.json", "jsconfig.json"];
|
|
40450
40470
|
SKIP_CATEGORIES = new Set([
|
|
40451
40471
|
"Command-line Options",
|
|
@@ -40595,7 +40615,6 @@ var init_resolvePrettier = __esm(() => {
|
|
|
40595
40615
|
});
|
|
40596
40616
|
|
|
40597
40617
|
// src/cli/config/schema/fromType.ts
|
|
40598
|
-
import ts2 from "typescript";
|
|
40599
40618
|
import {
|
|
40600
40619
|
existsSync as existsSync7,
|
|
40601
40620
|
mkdirSync as mkdirSync2,
|
|
@@ -40612,14 +40631,14 @@ var VIRTUAL_NAME = "__absolute_type_introspect__.ts", MAX_DEPTH2 = 6, isFramewor
|
|
|
40612
40631
|
return false;
|
|
40613
40632
|
}
|
|
40614
40633
|
}, compilerOptionsFor = (cwd) => {
|
|
40615
|
-
const tsconfigPath =
|
|
40634
|
+
const tsconfigPath = lazyTypescript.findConfigFile(cwd, lazyTypescript.sys.fileExists, "tsconfig.json");
|
|
40616
40635
|
const parseConfigHost = {
|
|
40617
|
-
...
|
|
40636
|
+
...lazyTypescript.sys,
|
|
40618
40637
|
onUnRecoverableConfigFileDiagnostic: () => {}
|
|
40619
40638
|
};
|
|
40620
|
-
const base = tsconfigPath &&
|
|
40639
|
+
const base = tsconfigPath && lazyTypescript.getParsedCommandLineOfConfigFile(tsconfigPath, {}, parseConfigHost)?.options;
|
|
40621
40640
|
return {
|
|
40622
|
-
...base ??
|
|
40641
|
+
...base ?? lazyTypescript.getDefaultCompilerOptions(),
|
|
40623
40642
|
noEmit: true,
|
|
40624
40643
|
skipDefaultLibCheck: true,
|
|
40625
40644
|
skipLibCheck: true,
|
|
@@ -40667,7 +40686,7 @@ var VIRTUAL_NAME = "__absolute_type_introspect__.ts", MAX_DEPTH2 = 6, isFramewor
|
|
|
40667
40686
|
});
|
|
40668
40687
|
writeFileSync4(cacheFile(cwd, typeName, specifier), JSON.stringify({ fields, signature }));
|
|
40669
40688
|
} catch {}
|
|
40670
|
-
}, docOf = (symbol, checker) =>
|
|
40689
|
+
}, docOf = (symbol, checker) => lazyTypescript.displayPartsToString(symbol.getDocumentationComment(checker)).trim(), typeOfSymbol = (symbol, checker) => {
|
|
40671
40690
|
const declaration = symbol.valueDeclaration ?? symbol.declarations?.[0];
|
|
40672
40691
|
return declaration ? checker.getTypeOfSymbolAtLocation(symbol, declaration) : checker.getDeclaredTypeOfSymbol(symbol);
|
|
40673
40692
|
}, hasFlag = (type, flag) => (type.flags & flag) !== 0, unionParts = (type) => type.isUnion() ? type.types : [type], literalChoice = (type) => {
|
|
@@ -40683,10 +40702,10 @@ var VIRTUAL_NAME = "__absolute_type_introspect__.ts", MAX_DEPTH2 = 6, isFramewor
|
|
|
40683
40702
|
});
|
|
40684
40703
|
if (depth > MAX_DEPTH2)
|
|
40685
40704
|
return opaque();
|
|
40686
|
-
const parts = unionParts(type).filter((part) => !hasFlag(part,
|
|
40705
|
+
const parts = unionParts(type).filter((part) => !hasFlag(part, lazyTypescript.TypeFlags.Undefined) && !hasFlag(part, lazyTypescript.TypeFlags.Null));
|
|
40687
40706
|
if (parts.length === 0)
|
|
40688
40707
|
return opaque();
|
|
40689
|
-
if (parts.every((part) => hasFlag(part,
|
|
40708
|
+
if (parts.every((part) => hasFlag(part, lazyTypescript.TypeFlags.BooleanLike))) {
|
|
40690
40709
|
return { kind: "boolean" };
|
|
40691
40710
|
}
|
|
40692
40711
|
const choices = parts.map(literalChoice);
|
|
@@ -40706,13 +40725,13 @@ var VIRTUAL_NAME = "__absolute_type_introspect__.ts", MAX_DEPTH2 = 6, isFramewor
|
|
|
40706
40725
|
kind: "opaque",
|
|
40707
40726
|
typeText: checker.typeToString(type)
|
|
40708
40727
|
});
|
|
40709
|
-
if (hasFlag(type,
|
|
40728
|
+
if (hasFlag(type, lazyTypescript.TypeFlags.BooleanLike))
|
|
40710
40729
|
return { kind: "boolean" };
|
|
40711
|
-
if (hasFlag(type,
|
|
40730
|
+
if (hasFlag(type, lazyTypescript.TypeFlags.NumberLike))
|
|
40712
40731
|
return { kind: "number" };
|
|
40713
|
-
if (hasFlag(type,
|
|
40732
|
+
if (hasFlag(type, lazyTypescript.TypeFlags.StringLike))
|
|
40714
40733
|
return { kind: "string" };
|
|
40715
|
-
if (!hasFlag(type,
|
|
40734
|
+
if (!hasFlag(type, lazyTypescript.TypeFlags.Object))
|
|
40716
40735
|
return opaque();
|
|
40717
40736
|
if (type.getCallSignatures().length > 0)
|
|
40718
40737
|
return opaque();
|
|
@@ -40733,7 +40752,7 @@ var VIRTUAL_NAME = "__absolute_type_introspect__.ts", MAX_DEPTH2 = 6, isFramewor
|
|
|
40733
40752
|
const fields = props.map((symbol) => ({
|
|
40734
40753
|
description: docOf(symbol, checker),
|
|
40735
40754
|
name: symbol.getName(),
|
|
40736
|
-
optional: (symbol.flags &
|
|
40755
|
+
optional: (symbol.flags & lazyTypescript.SymbolFlags.Optional) !== 0,
|
|
40737
40756
|
schema: toSchema(typeOfSymbol(symbol, checker), checker, depth + 1, seen)
|
|
40738
40757
|
}));
|
|
40739
40758
|
return { fields, kind: "object" };
|
|
@@ -40754,21 +40773,21 @@ var VIRTUAL_NAME = "__absolute_type_introspect__.ts", MAX_DEPTH2 = 6, isFramewor
|
|
|
40754
40773
|
declare const value: ${typeName};
|
|
40755
40774
|
export { value };
|
|
40756
40775
|
`;
|
|
40757
|
-
const host =
|
|
40776
|
+
const host = lazyTypescript.createCompilerHost(options, true);
|
|
40758
40777
|
const getSourceFile = host.getSourceFile.bind(host);
|
|
40759
|
-
host.getSourceFile = (fileName, languageVersion, onError, shouldCreate) => fileName === virtualPath ?
|
|
40778
|
+
host.getSourceFile = (fileName, languageVersion, onError, shouldCreate) => fileName === virtualPath ? lazyTypescript.createSourceFile(fileName, source, languageVersion, true) : getSourceFile(fileName, languageVersion, onError, shouldCreate);
|
|
40760
40779
|
const fileExists = host.fileExists.bind(host);
|
|
40761
40780
|
host.fileExists = (fileName) => fileName === virtualPath ? true : fileExists(fileName);
|
|
40762
40781
|
const readFile = host.readFile.bind(host);
|
|
40763
40782
|
host.readFile = (fileName) => fileName === virtualPath ? source : readFile(fileName);
|
|
40764
|
-
const program =
|
|
40783
|
+
const program = lazyTypescript.createProgram([virtualPath], options, host);
|
|
40765
40784
|
const checker = program.getTypeChecker();
|
|
40766
40785
|
const sourceFile = program.getSourceFile(virtualPath);
|
|
40767
40786
|
if (!sourceFile)
|
|
40768
40787
|
return [];
|
|
40769
40788
|
const nodes = [];
|
|
40770
40789
|
sourceFile.forEachChild((node) => {
|
|
40771
|
-
if (!
|
|
40790
|
+
if (!lazyTypescript.isVariableStatement(node))
|
|
40772
40791
|
return;
|
|
40773
40792
|
const [declaration] = node.declarationList.declarations;
|
|
40774
40793
|
if (!declaration)
|
|
@@ -40781,7 +40800,7 @@ export { value };
|
|
|
40781
40800
|
nodes.push({
|
|
40782
40801
|
description: docOf(symbol, checker),
|
|
40783
40802
|
name,
|
|
40784
|
-
optional: (symbol.flags &
|
|
40803
|
+
optional: (symbol.flags & lazyTypescript.SymbolFlags.Optional) !== 0,
|
|
40785
40804
|
schema: toSchema(typeOfSymbol(symbol, checker), checker, 1, new Set)
|
|
40786
40805
|
});
|
|
40787
40806
|
}
|
|
@@ -40815,6 +40834,7 @@ export { value };
|
|
|
40815
40834
|
return cache.get(cacheKey) ?? [];
|
|
40816
40835
|
};
|
|
40817
40836
|
var init_fromType = __esm(() => {
|
|
40837
|
+
init_lazyTypescript();
|
|
40818
40838
|
cache = new Map;
|
|
40819
40839
|
});
|
|
40820
40840
|
|
|
@@ -40827,7 +40847,6 @@ __export(exports_resolveAbsoluteConfig, {
|
|
|
40827
40847
|
readAbsoluteConfigValues: () => readAbsoluteConfigValues,
|
|
40828
40848
|
resolveAbsoluteConfigState: () => resolveAbsoluteConfigState
|
|
40829
40849
|
});
|
|
40830
|
-
import ts3 from "typescript";
|
|
40831
40850
|
import { existsSync as existsSync8, readFileSync as readFileSync10 } from "fs";
|
|
40832
40851
|
import { resolve as resolve7 } from "path";
|
|
40833
40852
|
var CONFIG_CANDIDATES3, RUNTIME_FIELDS, findConfigPath2 = (cwd, override) => {
|
|
@@ -40841,17 +40860,17 @@ var CONFIG_CANDIDATES3, RUNTIME_FIELDS, findConfigPath2 = (cwd, override) => {
|
|
|
40841
40860
|
return candidate;
|
|
40842
40861
|
}
|
|
40843
40862
|
return null;
|
|
40844
|
-
}, parseSource = (configPath, text) =>
|
|
40863
|
+
}, parseSource = (configPath, text) => lazyTypescript.createSourceFile(configPath, text, lazyTypescript.ScriptTarget.Latest, true), findConfigObject = (sourceFile) => {
|
|
40845
40864
|
const pending = [sourceFile];
|
|
40846
40865
|
while (pending.length > 0) {
|
|
40847
40866
|
const node = pending.pop();
|
|
40848
40867
|
if (!node)
|
|
40849
40868
|
continue;
|
|
40850
|
-
const [firstArgument] =
|
|
40851
|
-
if (
|
|
40869
|
+
const [firstArgument] = lazyTypescript.isCallExpression(node) ? node.arguments : [];
|
|
40870
|
+
if (lazyTypescript.isCallExpression(node) && lazyTypescript.isIdentifier(node.expression) && node.expression.text === "defineConfig" && firstArgument && lazyTypescript.isObjectLiteralExpression(firstArgument)) {
|
|
40852
40871
|
return firstArgument;
|
|
40853
40872
|
}
|
|
40854
|
-
if (
|
|
40873
|
+
if (lazyTypescript.isExportAssignment(node) && lazyTypescript.isObjectLiteralExpression(node.expression)) {
|
|
40855
40874
|
return node.expression;
|
|
40856
40875
|
}
|
|
40857
40876
|
node.forEachChild((child) => {
|
|
@@ -40863,25 +40882,25 @@ var CONFIG_CANDIDATES3, RUNTIME_FIELDS, findConfigPath2 = (cwd, override) => {
|
|
|
40863
40882
|
const text = readFileSync10(configPath, "utf-8");
|
|
40864
40883
|
return { object: findConfigObject(parseSource(configPath, text)), text };
|
|
40865
40884
|
}, evalLiteral = (node) => {
|
|
40866
|
-
if (
|
|
40885
|
+
if (lazyTypescript.isStringLiteralLike(node)) {
|
|
40867
40886
|
return { opaque: false, value: node.text };
|
|
40868
40887
|
}
|
|
40869
|
-
if (node.kind ===
|
|
40888
|
+
if (node.kind === lazyTypescript.SyntaxKind.TrueKeyword) {
|
|
40870
40889
|
return { opaque: false, value: true };
|
|
40871
40890
|
}
|
|
40872
|
-
if (node.kind ===
|
|
40891
|
+
if (node.kind === lazyTypescript.SyntaxKind.FalseKeyword) {
|
|
40873
40892
|
return { opaque: false, value: false };
|
|
40874
40893
|
}
|
|
40875
|
-
if (node.kind ===
|
|
40894
|
+
if (node.kind === lazyTypescript.SyntaxKind.NullKeyword) {
|
|
40876
40895
|
return { opaque: false, value: null };
|
|
40877
40896
|
}
|
|
40878
|
-
if (
|
|
40897
|
+
if (lazyTypescript.isNumericLiteral(node)) {
|
|
40879
40898
|
return { opaque: false, value: Number(node.text) };
|
|
40880
40899
|
}
|
|
40881
|
-
if (
|
|
40900
|
+
if (lazyTypescript.isPrefixUnaryExpression(node) && node.operator === lazyTypescript.SyntaxKind.MinusToken && lazyTypescript.isNumericLiteral(node.operand)) {
|
|
40882
40901
|
return { opaque: false, value: -Number(node.operand.text) };
|
|
40883
40902
|
}
|
|
40884
|
-
if (
|
|
40903
|
+
if (lazyTypescript.isArrayLiteralExpression(node)) {
|
|
40885
40904
|
const items = [];
|
|
40886
40905
|
for (const element of node.elements) {
|
|
40887
40906
|
const result = evalLiteral(element);
|
|
@@ -40891,10 +40910,10 @@ var CONFIG_CANDIDATES3, RUNTIME_FIELDS, findConfigPath2 = (cwd, override) => {
|
|
|
40891
40910
|
}
|
|
40892
40911
|
return { opaque: false, value: items };
|
|
40893
40912
|
}
|
|
40894
|
-
if (
|
|
40913
|
+
if (lazyTypescript.isObjectLiteralExpression(node)) {
|
|
40895
40914
|
const object = {};
|
|
40896
40915
|
for (const property of node.properties) {
|
|
40897
|
-
if (!
|
|
40916
|
+
if (!lazyTypescript.isPropertyAssignment(property) || !(lazyTypescript.isIdentifier(property.name) || lazyTypescript.isStringLiteral(property.name))) {
|
|
40898
40917
|
return { opaque: true, value: undefined };
|
|
40899
40918
|
}
|
|
40900
40919
|
const result = evalLiteral(property.initializer);
|
|
@@ -40912,7 +40931,7 @@ var CONFIG_CANDIDATES3, RUNTIME_FIELDS, findConfigPath2 = (cwd, override) => {
|
|
|
40912
40931
|
if (!object)
|
|
40913
40932
|
return { current, opaqueKeys };
|
|
40914
40933
|
for (const property of object.properties) {
|
|
40915
|
-
if (!
|
|
40934
|
+
if (!lazyTypescript.isPropertyAssignment(property) || !(lazyTypescript.isIdentifier(property.name) || lazyTypescript.isStringLiteral(property.name))) {
|
|
40916
40935
|
continue;
|
|
40917
40936
|
}
|
|
40918
40937
|
const name = property.name.text;
|
|
@@ -40940,6 +40959,7 @@ var CONFIG_CANDIDATES3, RUNTIME_FIELDS, findConfigPath2 = (cwd, override) => {
|
|
|
40940
40959
|
};
|
|
40941
40960
|
};
|
|
40942
40961
|
var init_resolveAbsoluteConfig = __esm(() => {
|
|
40962
|
+
init_lazyTypescript();
|
|
40943
40963
|
init_fromType();
|
|
40944
40964
|
CONFIG_CANDIDATES3 = [
|
|
40945
40965
|
"absolute.config.ts",
|
|
@@ -40996,7 +41016,6 @@ var exports_editAbsoluteConfig = {};
|
|
|
40996
41016
|
__export(exports_editAbsoluteConfig, {
|
|
40997
41017
|
applyAbsoluteConfigEdit: () => applyAbsoluteConfigEdit
|
|
40998
41018
|
});
|
|
40999
|
-
import ts4 from "typescript";
|
|
41000
41019
|
import { readFileSync as readFileSync11, writeFileSync as writeFileSync5 } from "fs";
|
|
41001
41020
|
var lineStartOffset = (text, position) => {
|
|
41002
41021
|
let index = position;
|
|
@@ -41004,10 +41023,10 @@ var lineStartOffset = (text, position) => {
|
|
|
41004
41023
|
`)
|
|
41005
41024
|
index -= 1;
|
|
41006
41025
|
return index;
|
|
41007
|
-
}, indentBefore = (text, position) => text.slice(lineStartOffset(text, position), position), findProperty2 = (object, name) => object.properties.find((property) =>
|
|
41026
|
+
}, indentBefore = (text, position) => text.slice(lineStartOffset(text, position), position), findProperty2 = (object, name) => object.properties.find((property) => lazyTypescript.isPropertyAssignment(property) && (lazyTypescript.isIdentifier(property.name) || lazyTypescript.isStringLiteral(property.name)) && property.name.text === name), applyAbsoluteConfigEdit = (configPath, request) => {
|
|
41008
41027
|
try {
|
|
41009
41028
|
const text = readFileSync11(configPath, "utf-8");
|
|
41010
|
-
const sourceFile =
|
|
41029
|
+
const sourceFile = lazyTypescript.createSourceFile(configPath, text, lazyTypescript.ScriptTarget.Latest, true);
|
|
41011
41030
|
const object = findConfigObject(sourceFile);
|
|
41012
41031
|
if (!object) {
|
|
41013
41032
|
return {
|
|
@@ -41068,6 +41087,7 @@ ${indentBefore(text, object.getStart(sourceFile))}`;
|
|
|
41068
41087
|
}
|
|
41069
41088
|
};
|
|
41070
41089
|
var init_editAbsoluteConfig = __esm(() => {
|
|
41090
|
+
init_lazyTypescript();
|
|
41071
41091
|
init_resolveAbsoluteConfig();
|
|
41072
41092
|
init_serialize();
|
|
41073
41093
|
});
|
|
@@ -41450,7 +41470,6 @@ __export(exports_resolveAuthSettings, {
|
|
|
41450
41470
|
parseAuthSettingsObject: () => parseAuthSettingsObject,
|
|
41451
41471
|
resolveAuthSettingsState: () => resolveAuthSettingsState
|
|
41452
41472
|
});
|
|
41453
|
-
import ts5 from "typescript";
|
|
41454
41473
|
import { existsSync as existsSync10, readFileSync as readFileSync14 } from "fs";
|
|
41455
41474
|
import { resolve as resolve9 } from "path";
|
|
41456
41475
|
var AUTH_PACKAGE = "@absolutejs/auth", CONFIG_CANDIDATES4, findAuthSettingsPath = (cwd, override) => {
|
|
@@ -41464,17 +41483,17 @@ var AUTH_PACKAGE = "@absolutejs/auth", CONFIG_CANDIDATES4, findAuthSettingsPath
|
|
|
41464
41483
|
return candidate;
|
|
41465
41484
|
}
|
|
41466
41485
|
return null;
|
|
41467
|
-
}, parseSource2 = (configPath, text) =>
|
|
41486
|
+
}, parseSource2 = (configPath, text) => lazyTypescript.createSourceFile(configPath, text, lazyTypescript.ScriptTarget.Latest, true), findAuthSettingsObject = (sourceFile) => {
|
|
41468
41487
|
const pending = [sourceFile];
|
|
41469
41488
|
while (pending.length > 0) {
|
|
41470
41489
|
const node = pending.pop();
|
|
41471
41490
|
if (!node)
|
|
41472
41491
|
continue;
|
|
41473
|
-
const [firstArgument] =
|
|
41474
|
-
if (
|
|
41492
|
+
const [firstArgument] = lazyTypescript.isCallExpression(node) ? node.arguments : [];
|
|
41493
|
+
if (lazyTypescript.isCallExpression(node) && lazyTypescript.isIdentifier(node.expression) && node.expression.text === "defineAuthSettings" && firstArgument && lazyTypescript.isObjectLiteralExpression(firstArgument)) {
|
|
41475
41494
|
return firstArgument;
|
|
41476
41495
|
}
|
|
41477
|
-
if (
|
|
41496
|
+
if (lazyTypescript.isExportAssignment(node) && lazyTypescript.isObjectLiteralExpression(node.expression)) {
|
|
41478
41497
|
return node.expression;
|
|
41479
41498
|
}
|
|
41480
41499
|
node.forEachChild((child) => {
|
|
@@ -41489,24 +41508,24 @@ var AUTH_PACKAGE = "@absolutejs/auth", CONFIG_CANDIDATES4, findAuthSettingsPath
|
|
|
41489
41508
|
text
|
|
41490
41509
|
};
|
|
41491
41510
|
}, evalLiteral2 = (node) => {
|
|
41492
|
-
if (
|
|
41511
|
+
if (lazyTypescript.isStringLiteralLike(node))
|
|
41493
41512
|
return { opaque: false, value: node.text };
|
|
41494
|
-
if (node.kind ===
|
|
41513
|
+
if (node.kind === lazyTypescript.SyntaxKind.TrueKeyword) {
|
|
41495
41514
|
return { opaque: false, value: true };
|
|
41496
41515
|
}
|
|
41497
|
-
if (node.kind ===
|
|
41516
|
+
if (node.kind === lazyTypescript.SyntaxKind.FalseKeyword) {
|
|
41498
41517
|
return { opaque: false, value: false };
|
|
41499
41518
|
}
|
|
41500
|
-
if (node.kind ===
|
|
41519
|
+
if (node.kind === lazyTypescript.SyntaxKind.NullKeyword) {
|
|
41501
41520
|
return { opaque: false, value: null };
|
|
41502
41521
|
}
|
|
41503
|
-
if (
|
|
41522
|
+
if (lazyTypescript.isNumericLiteral(node)) {
|
|
41504
41523
|
return { opaque: false, value: Number(node.text) };
|
|
41505
41524
|
}
|
|
41506
|
-
if (
|
|
41525
|
+
if (lazyTypescript.isPrefixUnaryExpression(node) && node.operator === lazyTypescript.SyntaxKind.MinusToken && lazyTypescript.isNumericLiteral(node.operand)) {
|
|
41507
41526
|
return { opaque: false, value: -Number(node.operand.text) };
|
|
41508
41527
|
}
|
|
41509
|
-
if (
|
|
41528
|
+
if (lazyTypescript.isArrayLiteralExpression(node)) {
|
|
41510
41529
|
const items = [];
|
|
41511
41530
|
for (const element of node.elements) {
|
|
41512
41531
|
const result = evalLiteral2(element);
|
|
@@ -41524,7 +41543,7 @@ var AUTH_PACKAGE = "@absolutejs/auth", CONFIG_CANDIDATES4, findAuthSettingsPath
|
|
|
41524
41543
|
if (!object)
|
|
41525
41544
|
return { current, opaqueKeys };
|
|
41526
41545
|
for (const property of object.properties) {
|
|
41527
|
-
if (!
|
|
41546
|
+
if (!lazyTypescript.isPropertyAssignment(property) || !(lazyTypescript.isIdentifier(property.name) || lazyTypescript.isStringLiteral(property.name))) {
|
|
41528
41547
|
continue;
|
|
41529
41548
|
}
|
|
41530
41549
|
const name = property.name.text;
|
|
@@ -41548,6 +41567,7 @@ var AUTH_PACKAGE = "@absolutejs/auth", CONFIG_CANDIDATES4, findAuthSettingsPath
|
|
|
41548
41567
|
};
|
|
41549
41568
|
};
|
|
41550
41569
|
var init_resolveAuthSettings = __esm(() => {
|
|
41570
|
+
init_lazyTypescript();
|
|
41551
41571
|
init_fromType();
|
|
41552
41572
|
CONFIG_CANDIDATES4 = [
|
|
41553
41573
|
"auth.config.ts",
|
|
@@ -41561,7 +41581,6 @@ var exports_resolveAuthState = {};
|
|
|
41561
41581
|
__export(exports_resolveAuthState, {
|
|
41562
41582
|
resolveAuthState: () => resolveAuthState
|
|
41563
41583
|
});
|
|
41564
|
-
import ts6 from "typescript";
|
|
41565
41584
|
import { existsSync as existsSync11, readdirSync, readFileSync as readFileSync15 } from "fs";
|
|
41566
41585
|
import { join as join2, relative, resolve as resolve10 } from "path";
|
|
41567
41586
|
var AUTH_PACKAGE2 = "@absolutejs/auth", REPO_URL = "https://github.com/absolutejs/absolute-auth", NPM_URL = "https://www.npmjs.com/package/@absolutejs/auth", SKIP_DIRS, MAX_FILES = 4000, SETUP_EXPORTS, isRecord4 = (value) => typeof value === "object" && value !== null && !Array.isArray(value), readJson = (path) => {
|
|
@@ -41618,9 +41637,9 @@ var AUTH_PACKAGE2 = "@absolutejs/auth", REPO_URL = "https://github.com/absolutej
|
|
|
41618
41637
|
collectFrom(dir, found, stack);
|
|
41619
41638
|
}
|
|
41620
41639
|
return found;
|
|
41621
|
-
}, isAuthPackageImport = (statement) =>
|
|
41640
|
+
}, isAuthPackageImport = (statement) => lazyTypescript.isImportDeclaration(statement) && lazyTypescript.isStringLiteral(statement.moduleSpecifier) && statement.moduleSpecifier.text === AUTH_PACKAGE2, addAuthNames = (statement, names) => {
|
|
41622
41641
|
const bindings = statement.importClause?.namedBindings;
|
|
41623
|
-
if (!bindings || !
|
|
41642
|
+
if (!bindings || !lazyTypescript.isNamedImports(bindings))
|
|
41624
41643
|
return;
|
|
41625
41644
|
for (const element of bindings.elements) {
|
|
41626
41645
|
const imported = element.propertyName?.text ?? element.name.text;
|
|
@@ -41635,18 +41654,18 @@ var AUTH_PACKAGE2 = "@absolutejs/auth", REPO_URL = "https://github.com/absolutej
|
|
|
41635
41654
|
addAuthNames(statement, names);
|
|
41636
41655
|
}
|
|
41637
41656
|
return names;
|
|
41638
|
-
}, isAuthCall = (node, bindings) =>
|
|
41639
|
-
if (!
|
|
41657
|
+
}, isAuthCall = (node, bindings) => lazyTypescript.isIdentifier(node.expression) && bindings.has(node.expression.text), providerCountOf = (property) => {
|
|
41658
|
+
if (!lazyTypescript.isPropertyAssignment(property) || !lazyTypescript.isObjectLiteralExpression(property.initializer)) {
|
|
41640
41659
|
return null;
|
|
41641
41660
|
}
|
|
41642
41661
|
return property.initializer.properties.length;
|
|
41643
41662
|
}, readConfigKeys = (object) => {
|
|
41644
41663
|
const keys = new Set;
|
|
41645
41664
|
let providerCount = null;
|
|
41646
|
-
const usesSpread = object.properties.some((property) =>
|
|
41665
|
+
const usesSpread = object.properties.some((property) => lazyTypescript.isSpreadAssignment(property));
|
|
41647
41666
|
for (const property of object.properties) {
|
|
41648
41667
|
const { name } = property;
|
|
41649
|
-
if (name === undefined || !
|
|
41668
|
+
if (name === undefined || !lazyTypescript.isIdentifier(name))
|
|
41650
41669
|
continue;
|
|
41651
41670
|
keys.add(name.text);
|
|
41652
41671
|
if (name.text !== "providersConfiguration")
|
|
@@ -41656,7 +41675,7 @@ var AUTH_PACKAGE2 = "@absolutejs/auth", REPO_URL = "https://github.com/absolutej
|
|
|
41656
41675
|
return { keys, providerCount, usesSpread };
|
|
41657
41676
|
}, matchFromCall = (node) => {
|
|
41658
41677
|
const [arg] = node.arguments;
|
|
41659
|
-
if (arg &&
|
|
41678
|
+
if (arg && lazyTypescript.isObjectLiteralExpression(arg))
|
|
41660
41679
|
return readConfigKeys(arg);
|
|
41661
41680
|
return { keys: new Set, providerCount: null, usesSpread: true };
|
|
41662
41681
|
}, readFileOrNull = (path) => {
|
|
@@ -41669,7 +41688,7 @@ var AUTH_PACKAGE2 = "@absolutejs/auth", REPO_URL = "https://github.com/absolutej
|
|
|
41669
41688
|
const text = readFileOrNull(path);
|
|
41670
41689
|
if (text === null || !text.includes(AUTH_PACKAGE2))
|
|
41671
41690
|
return null;
|
|
41672
|
-
const sourceFile =
|
|
41691
|
+
const sourceFile = lazyTypescript.createSourceFile(path, text, lazyTypescript.ScriptTarget.Latest, true);
|
|
41673
41692
|
const bindings = authBindings(sourceFile);
|
|
41674
41693
|
if (bindings.size === 0)
|
|
41675
41694
|
return null;
|
|
@@ -41678,7 +41697,7 @@ var AUTH_PACKAGE2 = "@absolutejs/auth", REPO_URL = "https://github.com/absolutej
|
|
|
41678
41697
|
const node = pending.pop();
|
|
41679
41698
|
if (!node)
|
|
41680
41699
|
continue;
|
|
41681
|
-
if (
|
|
41700
|
+
if (lazyTypescript.isCallExpression(node) && isAuthCall(node, bindings)) {
|
|
41682
41701
|
return matchFromCall(node);
|
|
41683
41702
|
}
|
|
41684
41703
|
node.forEachChild((child) => {
|
|
@@ -41724,6 +41743,7 @@ var AUTH_PACKAGE2 = "@absolutejs/auth", REPO_URL = "https://github.com/absolutej
|
|
|
41724
41743
|
return state;
|
|
41725
41744
|
};
|
|
41726
41745
|
var init_resolveAuthState = __esm(() => {
|
|
41746
|
+
init_lazyTypescript();
|
|
41727
41747
|
init_authCatalog();
|
|
41728
41748
|
init_authScaffolds();
|
|
41729
41749
|
init_resolveAuthSettings();
|
|
@@ -41745,7 +41765,6 @@ var exports_editAuthConfig = {};
|
|
|
41745
41765
|
__export(exports_editAuthConfig, {
|
|
41746
41766
|
applyAuthConfigEdit: () => applyAuthConfigEdit
|
|
41747
41767
|
});
|
|
41748
|
-
import ts7 from "typescript";
|
|
41749
41768
|
import { readFileSync as readFileSync16, writeFileSync as writeFileSync7 } from "fs";
|
|
41750
41769
|
var lineStartOffset2 = (text, position) => {
|
|
41751
41770
|
let index = position;
|
|
@@ -41753,10 +41772,10 @@ var lineStartOffset2 = (text, position) => {
|
|
|
41753
41772
|
`)
|
|
41754
41773
|
index -= 1;
|
|
41755
41774
|
return index;
|
|
41756
|
-
}, indentBefore2 = (text, position) => text.slice(lineStartOffset2(text, position), position), findProperty3 = (object, name) => object.properties.find((property) =>
|
|
41775
|
+
}, indentBefore2 = (text, position) => text.slice(lineStartOffset2(text, position), position), findProperty3 = (object, name) => object.properties.find((property) => lazyTypescript.isPropertyAssignment(property) && (lazyTypescript.isIdentifier(property.name) || lazyTypescript.isStringLiteral(property.name)) && property.name.text === name), applyAuthConfigEdit = (configPath, request) => {
|
|
41757
41776
|
try {
|
|
41758
41777
|
const text = readFileSync16(configPath, "utf-8");
|
|
41759
|
-
const sourceFile =
|
|
41778
|
+
const sourceFile = lazyTypescript.createSourceFile(configPath, text, lazyTypescript.ScriptTarget.Latest, true);
|
|
41760
41779
|
const object = findAuthSettingsObject(sourceFile);
|
|
41761
41780
|
if (!object) {
|
|
41762
41781
|
return {
|
|
@@ -41817,6 +41836,7 @@ ${indentBefore2(text, object.getStart(sourceFile))}`;
|
|
|
41817
41836
|
}
|
|
41818
41837
|
};
|
|
41819
41838
|
var init_editAuthConfig = __esm(() => {
|
|
41839
|
+
init_lazyTypescript();
|
|
41820
41840
|
init_resolveAuthSettings();
|
|
41821
41841
|
init_serialize();
|
|
41822
41842
|
});
|
|
@@ -107,7 +107,7 @@ var isEditorTempFile = (path) => {
|
|
|
107
107
|
var isAbsoluteServerEntryCopyPath = (path) => /(?:^|[/\\])\.absolutejs-hmr-/.test(path);
|
|
108
108
|
|
|
109
109
|
// src/dev/restartScope.ts
|
|
110
|
-
import { realpathSync } from "fs";
|
|
110
|
+
import { realpathSync, statSync } from "fs";
|
|
111
111
|
var MODULE_FILE = /\.(?:[cm]?[jt]sx?|mts|cts)$/;
|
|
112
112
|
var DOCUMENT_FILE = /\.(?:md|mdx|markdown|txt|rst|adoc|log|csv)$/i;
|
|
113
113
|
var realPath = (path) => {
|
|
@@ -117,13 +117,20 @@ var realPath = (path) => {
|
|
|
117
117
|
return path;
|
|
118
118
|
}
|
|
119
119
|
};
|
|
120
|
+
var isDirectory = (path) => {
|
|
121
|
+
try {
|
|
122
|
+
return statSync(path).isDirectory();
|
|
123
|
+
} catch {
|
|
124
|
+
return false;
|
|
125
|
+
}
|
|
126
|
+
};
|
|
120
127
|
var isLoadedByThisProcess = (path) => (path in __require.cache) || (realPath(path) in __require.cache);
|
|
121
128
|
var changeNeedsRestart = (path, isLoaded = isLoadedByThisProcess) => {
|
|
122
129
|
if (DOCUMENT_FILE.test(path) || isTestSourcePath(path))
|
|
123
130
|
return false;
|
|
124
131
|
if (MODULE_FILE.test(path))
|
|
125
132
|
return isLoaded(path);
|
|
126
|
-
return
|
|
133
|
+
return !isDirectory(path);
|
|
127
134
|
};
|
|
128
135
|
|
|
129
136
|
// src/cli/scripts/dev.ts
|
|
@@ -687,6 +694,13 @@ var collectPositiveWatchRoots = (config, resolved) => {
|
|
|
687
694
|
}
|
|
688
695
|
} catch {}
|
|
689
696
|
}
|
|
697
|
+
const registryPath = config.islands?.registry;
|
|
698
|
+
if (registryPath) {
|
|
699
|
+
const registryDir = normalizePath(dirname(resolve3(cwd, registryPath)));
|
|
700
|
+
const isWatched = roots.some((root) => registryDir === root || registryDir.startsWith(`${root}/`));
|
|
701
|
+
if (!isWatched && registryDir !== normalizePath(cwd))
|
|
702
|
+
push(registryDir);
|
|
703
|
+
}
|
|
690
704
|
const extraDirs = config.dev?.watchDirs ?? [];
|
|
691
705
|
for (const dir of extraDirs)
|
|
692
706
|
push(dir);
|
|
@@ -1369,7 +1383,7 @@ var loadAbsoluteMobileDevModules = async () => {
|
|
|
1369
1383
|
expoNativeWatcher
|
|
1370
1384
|
] = await Promise.all([
|
|
1371
1385
|
import("./config-hy5dkexz.js"),
|
|
1372
|
-
import("./expoProject-
|
|
1386
|
+
import("./expoProject-1qtw97js.js"),
|
|
1373
1387
|
import("./expoDevController-018anvbm.js"),
|
|
1374
1388
|
import("./nativeAuth-ysv0x5dy.js"),
|
|
1375
1389
|
import("./androidEmulatorController-vqc5m2rp.js"),
|
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import"./index-wk0pyxrg.js";
|
|
3
|
+
import"./index-4j1twret.js";
|
|
3
4
|
import {
|
|
4
5
|
frameworks,
|
|
5
6
|
resolveProject,
|
|
6
7
|
selectFramework,
|
|
7
8
|
toModuleSpecifier
|
|
8
|
-
} from "./index-
|
|
9
|
+
} from "./index-enbw9484.js";
|
|
9
10
|
import"./index-t8jmj8w1.js";
|
|
10
11
|
import {
|
|
11
12
|
wirePluginUse
|
|
12
|
-
} from "./index-
|
|
13
|
+
} from "./index-23hvdyxf.js";
|
|
14
|
+
import {
|
|
15
|
+
colors
|
|
16
|
+
} from "./index-9djrap79.js";
|
|
13
17
|
import {
|
|
14
18
|
isValidName,
|
|
15
19
|
toCamelCase,
|
|
@@ -18,10 +22,7 @@ import {
|
|
|
18
22
|
toTitleCase,
|
|
19
23
|
emptyOutcome,
|
|
20
24
|
generatePage
|
|
21
|
-
} from "./index-
|
|
22
|
-
import {
|
|
23
|
-
colors
|
|
24
|
-
} from "./index-9djrap79.js";
|
|
25
|
+
} from "./index-pkw3jktb.js";
|
|
25
26
|
import"./index-125cfzvn.js";
|
|
26
27
|
import"./index-3ewt17wm.js";
|
|
27
28
|
import"./index-pr1skxen.js";
|