@animus-ui/next-plugin 0.1.9 → 0.1.12
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/index.cjs +88 -1742
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +78 -1731
- package/dist/loader-core-BthLSJQF.cjs +47 -0
- package/dist/loader-core-x6cOzF9v.mjs +42 -0
- package/dist/loader-core.d.ts +6 -13
- package/dist/loader-core.d.ts.map +1 -1
- package/dist/loader-path.d.ts +0 -13
- package/dist/loader-path.d.ts.map +1 -1
- package/dist/loader.cjs +10 -34
- package/dist/loader.d.ts +2 -24
- package/dist/loader.d.ts.map +1 -1
- package/dist/loader.mjs +3 -26
- package/dist/plugin.d.ts +18 -70
- package/dist/plugin.d.ts.map +1 -1
- package/dist/turbopack-config.d.ts +11 -38
- package/dist/turbopack-config.d.ts.map +1 -1
- package/dist/turbopack-loader.cjs +44 -64
- package/dist/turbopack-loader.d.ts +12 -24
- package/dist/turbopack-loader.d.ts.map +1 -1
- package/dist/turbopack-loader.mjs +40 -56
- package/dist/types.d.ts +25 -79
- package/dist/types.d.ts.map +1 -1
- package/dist/with-animus.d.ts +39 -24
- package/dist/with-animus.d.ts.map +1 -1
- package/package.json +8 -2
- package/dist/extraction-session.d.ts +0 -378
- package/dist/extraction-session.d.ts.map +0 -1
- package/dist/loader-core-C40WbC6s.cjs +0 -71
- package/dist/loader-core-D6Tm_b8F.mjs +0 -66
- package/dist/resolve-packages.d.ts +0 -8
- package/dist/resolve-packages.d.ts.map +0 -1
- package/dist/session-paths-CZoi19NW.cjs +0 -229
- package/dist/session-paths-DfYIPDcM.mjs +0 -107
- package/dist/session-paths.d.ts +0 -107
- package/dist/session-paths.d.ts.map +0 -1
- package/dist/singleton-BjSsGjsg.mjs +0 -217
- package/dist/singleton-BjZyw_8b.cjs +0 -366
- package/dist/singleton.d.ts +0 -96
- package/dist/singleton.d.ts.map +0 -1
- package/dist/timing.d.ts +0 -7
- package/dist/timing.d.ts.map +0 -1
- package/dist/turbopack-orchestrator.d.ts +0 -34
- package/dist/turbopack-orchestrator.d.ts.map +0 -1
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
let _animus_ui_extract_session = require("@animus-ui/extract/session");
|
|
2
|
+
//#region src/loader-core.ts
|
|
3
|
+
/** Matches every already-emitted stylesheet import — arbitrary relative
|
|
4
|
+
* prefixes and the Vite emitter's virtual id — not this bundler's id.
|
|
5
|
+
* Never derive it from the shared module-id constant: this reads foreign
|
|
6
|
+
* output, and deriving it silently stops matching the other forms. */
|
|
7
|
+
const CSS_IMPORT_RE = /import\s+['"](?:[^'"]*\.animus\/styles\.css|virtual:animus\/styles\.css)['"];\n?/g;
|
|
8
|
+
const CSS_IMPORT_STATEMENT = `import '${_animus_ui_extract_session.ANIMUS_CSS_MODULE_ID}';\n`;
|
|
9
|
+
const ROOT_ENTRY_RE = /^(src\/)?(?:app\/layout|pages\/_app)\.[tj]sx?$/;
|
|
10
|
+
function normalizePath(p) {
|
|
11
|
+
return p.replace(/\\/g, "/").replace(/^\.\//, "");
|
|
12
|
+
}
|
|
13
|
+
function isCssImportTarget(filename, cssImportTarget) {
|
|
14
|
+
const normalized = normalizePath(filename);
|
|
15
|
+
if (cssImportTarget) return normalized === normalizePath(cssImportTarget);
|
|
16
|
+
return ROOT_ENTRY_RE.test(normalized);
|
|
17
|
+
}
|
|
18
|
+
function transformWithManifest(args) {
|
|
19
|
+
const { source, filename, manifestJson, engineApi, opts } = args;
|
|
20
|
+
const isRootEntry = isCssImportTarget(filename, opts.cssImportTarget);
|
|
21
|
+
try {
|
|
22
|
+
const { transformFile } = engineApi();
|
|
23
|
+
const result = transformFile(source, filename, manifestJson);
|
|
24
|
+
let code = result.hasComponents ? result.code : source;
|
|
25
|
+
code = code.replace(CSS_IMPORT_RE, "");
|
|
26
|
+
if (isRootEntry && !code.includes(_animus_ui_extract_session.ANIMUS_CSS_MODULE_ID)) {
|
|
27
|
+
if (code.startsWith("'use client'") || code.startsWith("\"use client\"")) {
|
|
28
|
+
const nl = code.indexOf("\n");
|
|
29
|
+
if (nl === -1) code = `${code}\n${CSS_IMPORT_STATEMENT}`;
|
|
30
|
+
else code = `${code.slice(0, nl + 1)}${CSS_IMPORT_STATEMENT}${code.slice(nl + 1)}`;
|
|
31
|
+
} else code = `${CSS_IMPORT_STATEMENT}${code}`;
|
|
32
|
+
}
|
|
33
|
+
return code;
|
|
34
|
+
} catch (e) {
|
|
35
|
+
const msg = e instanceof Error ? e.message : String(e);
|
|
36
|
+
if (opts.strict) throw new Error(`[animus-extract] Transform failed for ${filename}: ${msg}`, { cause: e });
|
|
37
|
+
console.warn(`[animus-extract] Transform failed for ${filename}:`, msg);
|
|
38
|
+
return source;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
//#endregion
|
|
42
|
+
Object.defineProperty(exports, "transformWithManifest", {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: function() {
|
|
45
|
+
return transformWithManifest;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ANIMUS_CSS_MODULE_ID } from "@animus-ui/extract/session";
|
|
2
|
+
//#region src/loader-core.ts
|
|
3
|
+
/** Matches every already-emitted stylesheet import — arbitrary relative
|
|
4
|
+
* prefixes and the Vite emitter's virtual id — not this bundler's id.
|
|
5
|
+
* Never derive it from the shared module-id constant: this reads foreign
|
|
6
|
+
* output, and deriving it silently stops matching the other forms. */
|
|
7
|
+
const CSS_IMPORT_RE = /import\s+['"](?:[^'"]*\.animus\/styles\.css|virtual:animus\/styles\.css)['"];\n?/g;
|
|
8
|
+
const CSS_IMPORT_STATEMENT = `import '${ANIMUS_CSS_MODULE_ID}';\n`;
|
|
9
|
+
const ROOT_ENTRY_RE = /^(src\/)?(?:app\/layout|pages\/_app)\.[tj]sx?$/;
|
|
10
|
+
function normalizePath(p) {
|
|
11
|
+
return p.replace(/\\/g, "/").replace(/^\.\//, "");
|
|
12
|
+
}
|
|
13
|
+
function isCssImportTarget(filename, cssImportTarget) {
|
|
14
|
+
const normalized = normalizePath(filename);
|
|
15
|
+
if (cssImportTarget) return normalized === normalizePath(cssImportTarget);
|
|
16
|
+
return ROOT_ENTRY_RE.test(normalized);
|
|
17
|
+
}
|
|
18
|
+
function transformWithManifest(args) {
|
|
19
|
+
const { source, filename, manifestJson, engineApi, opts } = args;
|
|
20
|
+
const isRootEntry = isCssImportTarget(filename, opts.cssImportTarget);
|
|
21
|
+
try {
|
|
22
|
+
const { transformFile } = engineApi();
|
|
23
|
+
const result = transformFile(source, filename, manifestJson);
|
|
24
|
+
let code = result.hasComponents ? result.code : source;
|
|
25
|
+
code = code.replace(CSS_IMPORT_RE, "");
|
|
26
|
+
if (isRootEntry && !code.includes(ANIMUS_CSS_MODULE_ID)) {
|
|
27
|
+
if (code.startsWith("'use client'") || code.startsWith("\"use client\"")) {
|
|
28
|
+
const nl = code.indexOf("\n");
|
|
29
|
+
if (nl === -1) code = `${code}\n${CSS_IMPORT_STATEMENT}`;
|
|
30
|
+
else code = `${code.slice(0, nl + 1)}${CSS_IMPORT_STATEMENT}${code.slice(nl + 1)}`;
|
|
31
|
+
} else code = `${CSS_IMPORT_STATEMENT}${code}`;
|
|
32
|
+
}
|
|
33
|
+
return code;
|
|
34
|
+
} catch (e) {
|
|
35
|
+
const msg = e instanceof Error ? e.message : String(e);
|
|
36
|
+
if (opts.strict) throw new Error(`[animus-extract] Transform failed for ${filename}: ${msg}`, { cause: e });
|
|
37
|
+
console.warn(`[animus-extract] Transform failed for ${filename}:`, msg);
|
|
38
|
+
return source;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
//#endregion
|
|
42
|
+
export { transformWithManifest as t };
|
package/dist/loader-core.d.ts
CHANGED
|
@@ -1,20 +1,13 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Bundler-neutral loader policy shared by the webpack loader (manifest from
|
|
3
|
-
* the process singleton) and the Turbopack loader (manifest hydrated from
|
|
4
|
-
* disk artifacts). Owns the transform invocation, strict-mode error
|
|
5
|
-
* handling, and the single-stylesheet-import policy.
|
|
6
|
-
*/
|
|
7
1
|
export interface LoaderPolicyOptions {
|
|
8
2
|
strict?: boolean;
|
|
9
3
|
cssImportTarget?: string;
|
|
10
4
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
*/
|
|
5
|
+
export interface LoaderContextBase<O extends LoaderPolicyOptions = LoaderPolicyOptions> {
|
|
6
|
+
resourcePath: string;
|
|
7
|
+
rootContext: string;
|
|
8
|
+
getOptions: () => O;
|
|
9
|
+
addDependency?: (file: string) => void;
|
|
10
|
+
}
|
|
18
11
|
export declare function transformWithManifest(args: {
|
|
19
12
|
source: string;
|
|
20
13
|
/** Project-root-relative path of the file being transformed. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader-core.d.ts","sourceRoot":"","sources":["../src/loader-core.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"loader-core.d.ts","sourceRoot":"","sources":["../src/loader-core.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,mBAAmB;IAClC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,iBAAiB,CAChC,CAAC,SAAS,mBAAmB,GAAG,mBAAmB;IAEnD,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC,CAAC;IACpB,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACxC;AA4BD,wBAAgB,qBAAqB,CAAC,IAAI,EAAE;IAC1C,MAAM,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IAErB,SAAS,EAAE,MAAM,GAAG,CAAC;IACrB,IAAI,EAAE,mBAAmB,CAAC;CAC3B,GAAG,MAAM,CAwCT"}
|
package/dist/loader-path.d.ts
CHANGED
|
@@ -1,16 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The one loader-path derivation: first existing dist candidate under the
|
|
3
|
-
* plugin dir, else the in-repo source fallback. Both loader resolvers below
|
|
4
|
-
* are thin wrappers, so rule registration and any loader-chain predicate
|
|
5
|
-
* can never drift (openspec: next-webpack-served-transform-coherence,
|
|
6
|
-
* design D1).
|
|
7
|
-
*/
|
|
8
1
|
export declare function resolveLoaderPath(pluginDir: string, distCandidates: string[], sourceFallback: string): string;
|
|
9
|
-
/**
|
|
10
|
-
* This package's webpack loader path, shared by the rule registration
|
|
11
|
-
* (with-animus) and the needBuild loader-chain predicate (plugin). Compiled
|
|
12
|
-
* dist ships `loader.mjs` next to this module; running from source falls
|
|
13
|
-
* back to the TypeScript loader.
|
|
14
|
-
*/
|
|
15
2
|
export declare function resolveAnimusLoaderPath(): string;
|
|
16
3
|
//# sourceMappingURL=loader-path.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader-path.d.ts","sourceRoot":"","sources":["../src/loader-path.ts"],"names":[],"mappings":"AAOA
|
|
1
|
+
{"version":3,"file":"loader-path.d.ts","sourceRoot":"","sources":["../src/loader-path.ts"],"names":[],"mappings":"AAOA,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,MAAM,EACjB,cAAc,EAAE,MAAM,EAAE,EACxB,cAAc,EAAE,MAAM,GACrB,MAAM,CAMR;AAED,wBAAgB,uBAAuB,IAAI,MAAM,CAEhD"}
|
package/dist/loader.cjs
CHANGED
|
@@ -1,62 +1,38 @@
|
|
|
1
|
-
const
|
|
2
|
-
const require_singleton = require("./singleton-BjZyw_8b.cjs");
|
|
3
|
-
const require_loader_core = require("./loader-core-C40WbC6s.cjs");
|
|
4
|
-
require("./turbopack-loader.cjs");
|
|
1
|
+
const require_loader_core = require("./loader-core-BthLSJQF.cjs");
|
|
5
2
|
let _animus_ui_extract_pipeline = require("@animus-ui/extract/pipeline");
|
|
3
|
+
let _animus_ui_extract_session = require("@animus-ui/extract/session");
|
|
6
4
|
let fs = require("fs");
|
|
7
5
|
let path = require("path");
|
|
8
6
|
//#region src/loader.ts
|
|
9
|
-
/** Session dirs whose epoch artifact has been SEEN on disk. A sibling
|
|
10
|
-
* session's reconciliation may delete the artifact, but the owning
|
|
11
|
-
* session self-heals it on its next publish, so a positive existsSync
|
|
12
|
-
* stays a sound basis for registering the dependency: a module built
|
|
13
|
-
* during the missing window records a missing-file witness that the
|
|
14
|
-
* recreation then invalidates (over-invalidation, never under).
|
|
15
|
-
* Negatives always re-probe. */
|
|
16
7
|
const epochSeenForSessionDir = /* @__PURE__ */ new Set();
|
|
17
|
-
/**
|
|
18
|
-
* Webpack loader for Animus source transformation.
|
|
19
|
-
* Runs with enforce: 'pre' to see original source before Babel/SWC.
|
|
20
|
-
* The manifest arrives via the process singleton (the webpack pipeline and
|
|
21
|
-
* this loader share one process); the transform + CSS-import policy lives
|
|
22
|
-
* in the shared loader-core.
|
|
23
|
-
*
|
|
24
|
-
* Coherence duties (openspec: next-webpack-served-transform-coherence):
|
|
25
|
-
* every dev invocation registers the replacement-epoch artifact as a file
|
|
26
|
-
* dependency (design D2 — restored persistent-cache modules snapshot it, so
|
|
27
|
-
* offline epoch moves invalidate them), and an analyzed file whose current
|
|
28
|
-
* source hash mismatches its analyzed hash fails with the stable diagnostic
|
|
29
|
-
* `ANIMUS_ANALYSIS_CATCHING_UP` after one refreshed re-check (design D4 —
|
|
30
|
-
* unconditional: a zero-entry stale manifest must never publish raw bytes).
|
|
31
|
-
*/
|
|
32
8
|
function animusLoader(source) {
|
|
33
|
-
if (this.mode !== "production" &&
|
|
34
|
-
const sessionDir =
|
|
9
|
+
if (this.mode !== "production" && this.addDependency !== void 0) {
|
|
10
|
+
const sessionDir = (0, _animus_ui_extract_session.getSessionArtifactDir)();
|
|
35
11
|
if (sessionDir) {
|
|
36
|
-
const epochPath =
|
|
12
|
+
const epochPath = (0, _animus_ui_extract_session.replacementEpochPath)(sessionDir);
|
|
37
13
|
if (epochSeenForSessionDir.has(sessionDir) || (0, fs.existsSync)(epochPath)) {
|
|
38
14
|
epochSeenForSessionDir.add(sessionDir);
|
|
39
15
|
this.addDependency(epochPath);
|
|
40
16
|
}
|
|
41
17
|
}
|
|
42
18
|
}
|
|
43
|
-
let manifestJson =
|
|
19
|
+
let manifestJson = (0, _animus_ui_extract_session.getManifestJson)();
|
|
44
20
|
if (!manifestJson) return source;
|
|
45
21
|
const filename = (0, path.relative)(this.rootContext, this.resourcePath);
|
|
46
|
-
const analyzedHash =
|
|
22
|
+
const analyzedHash = (0, _animus_ui_extract_session.getAnalyzedHashes)()?.get(filename);
|
|
47
23
|
if (analyzedHash !== void 0) {
|
|
48
24
|
const sourceHash = (0, _animus_ui_extract_pipeline.contentHash)(source);
|
|
49
25
|
if (sourceHash !== analyzedHash) {
|
|
50
|
-
const refreshedHash =
|
|
26
|
+
const refreshedHash = (0, _animus_ui_extract_session.getAnalyzedHashes)()?.get(filename);
|
|
51
27
|
if (refreshedHash === void 0 || sourceHash !== refreshedHash) throw new Error(`ANIMUS_ANALYSIS_CATCHING_UP: ${filename} changed after the current analysis; retrying on the next watch turn`);
|
|
52
|
-
manifestJson =
|
|
28
|
+
manifestJson = (0, _animus_ui_extract_session.getManifestJson)() ?? manifestJson;
|
|
53
29
|
}
|
|
54
30
|
}
|
|
55
31
|
return require_loader_core.transformWithManifest({
|
|
56
32
|
source,
|
|
57
33
|
filename,
|
|
58
34
|
manifestJson,
|
|
59
|
-
engineApi:
|
|
35
|
+
engineApi: _animus_ui_extract_session.engineApi,
|
|
60
36
|
opts: this.getOptions?.() ?? {}
|
|
61
37
|
});
|
|
62
38
|
}
|
package/dist/loader.d.ts
CHANGED
|
@@ -1,29 +1,7 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
type LoaderContext = {
|
|
3
|
-
resourcePath: string;
|
|
4
|
-
rootContext: string;
|
|
5
|
-
getOptions: () => LoaderPolicyOptions;
|
|
6
|
-
/** webpack file-dependency registration — optional so bare policy tests
|
|
7
|
-
* can drive the loader without a full context. */
|
|
8
|
-
addDependency?: (file: string) => void;
|
|
9
|
-
/** webpack build mode; production invocations stay engine-verbatim. */
|
|
1
|
+
import type { LoaderContextBase } from './loader-core';
|
|
2
|
+
type LoaderContext = LoaderContextBase & {
|
|
10
3
|
mode?: 'development' | 'production' | 'none';
|
|
11
4
|
};
|
|
12
|
-
/**
|
|
13
|
-
* Webpack loader for Animus source transformation.
|
|
14
|
-
* Runs with enforce: 'pre' to see original source before Babel/SWC.
|
|
15
|
-
* The manifest arrives via the process singleton (the webpack pipeline and
|
|
16
|
-
* this loader share one process); the transform + CSS-import policy lives
|
|
17
|
-
* in the shared loader-core.
|
|
18
|
-
*
|
|
19
|
-
* Coherence duties (openspec: next-webpack-served-transform-coherence):
|
|
20
|
-
* every dev invocation registers the replacement-epoch artifact as a file
|
|
21
|
-
* dependency (design D2 — restored persistent-cache modules snapshot it, so
|
|
22
|
-
* offline epoch moves invalidate them), and an analyzed file whose current
|
|
23
|
-
* source hash mismatches its analyzed hash fails with the stable diagnostic
|
|
24
|
-
* `ANIMUS_ANALYSIS_CATCHING_UP` after one refreshed re-check (design D4 —
|
|
25
|
-
* unconditional: a zero-entry stale manifest must never publish raw bytes).
|
|
26
|
-
*/
|
|
27
5
|
export default function animusLoader(this: LoaderContext, source: string): string;
|
|
28
6
|
export {};
|
|
29
7
|
//# sourceMappingURL=loader.d.ts.map
|
package/dist/loader.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../src/loader.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../src/loader.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAIvD,KAAK,aAAa,GAAG,iBAAiB,GAAG;IACvC,IAAI,CAAC,EAAE,aAAa,GAAG,YAAY,GAAG,MAAM,CAAC;CAC9C,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,IAAI,EAAE,aAAa,EACnB,MAAM,EAAE,MAAM,GACb,MAAM,CAsCR"}
|
package/dist/loader.mjs
CHANGED
|
@@ -1,35 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as getManifestJson, c as getSessionArtifactDir, i as getAnalyzedHashes, n as engineApi } from "./singleton-BjSsGjsg.mjs";
|
|
3
|
-
import { t as transformWithManifest } from "./loader-core-D6Tm_b8F.mjs";
|
|
1
|
+
import { t as transformWithManifest } from "./loader-core-x6cOzF9v.mjs";
|
|
4
2
|
import { contentHash } from "@animus-ui/extract/pipeline";
|
|
3
|
+
import { engineApi, getAnalyzedHashes, getManifestJson, getSessionArtifactDir, replacementEpochPath } from "@animus-ui/extract/session";
|
|
5
4
|
import { existsSync } from "fs";
|
|
6
5
|
import { relative } from "path";
|
|
7
6
|
//#region src/loader.ts
|
|
8
|
-
/** Session dirs whose epoch artifact has been SEEN on disk. A sibling
|
|
9
|
-
* session's reconciliation may delete the artifact, but the owning
|
|
10
|
-
* session self-heals it on its next publish, so a positive existsSync
|
|
11
|
-
* stays a sound basis for registering the dependency: a module built
|
|
12
|
-
* during the missing window records a missing-file witness that the
|
|
13
|
-
* recreation then invalidates (over-invalidation, never under).
|
|
14
|
-
* Negatives always re-probe. */
|
|
15
7
|
const epochSeenForSessionDir = /* @__PURE__ */ new Set();
|
|
16
|
-
/**
|
|
17
|
-
* Webpack loader for Animus source transformation.
|
|
18
|
-
* Runs with enforce: 'pre' to see original source before Babel/SWC.
|
|
19
|
-
* The manifest arrives via the process singleton (the webpack pipeline and
|
|
20
|
-
* this loader share one process); the transform + CSS-import policy lives
|
|
21
|
-
* in the shared loader-core.
|
|
22
|
-
*
|
|
23
|
-
* Coherence duties (openspec: next-webpack-served-transform-coherence):
|
|
24
|
-
* every dev invocation registers the replacement-epoch artifact as a file
|
|
25
|
-
* dependency (design D2 — restored persistent-cache modules snapshot it, so
|
|
26
|
-
* offline epoch moves invalidate them), and an analyzed file whose current
|
|
27
|
-
* source hash mismatches its analyzed hash fails with the stable diagnostic
|
|
28
|
-
* `ANIMUS_ANALYSIS_CATCHING_UP` after one refreshed re-check (design D4 —
|
|
29
|
-
* unconditional: a zero-entry stale manifest must never publish raw bytes).
|
|
30
|
-
*/
|
|
31
8
|
function animusLoader(source) {
|
|
32
|
-
if (this.mode !== "production" &&
|
|
9
|
+
if (this.mode !== "production" && this.addDependency !== void 0) {
|
|
33
10
|
const sessionDir = getSessionArtifactDir();
|
|
34
11
|
if (sessionDir) {
|
|
35
12
|
const epochPath = replacementEpochPath(sessionDir);
|
package/dist/plugin.d.ts
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import type { AnimusNextOptions } from './types';
|
|
2
|
-
export { ANIMUS_CSS_MODULE_ID } from '
|
|
2
|
+
export { ANIMUS_CSS_MODULE_ID } from '@animus-ui/extract/session';
|
|
3
3
|
type WebpackSource = {
|
|
4
4
|
source(): string | Buffer;
|
|
5
5
|
size(): number;
|
|
6
6
|
};
|
|
7
|
+
type WatchIgnoreEntry = string | RegExp;
|
|
8
|
+
type WatchIgnoreMatcher = (path: string) => boolean;
|
|
9
|
+
type WatchIgnored = WatchIgnoreEntry | WatchIgnoreEntry[] | WatchIgnoreMatcher | null | undefined;
|
|
10
|
+
type WebpackAliasMap = Record<string, string | string[] | false>;
|
|
7
11
|
type Compilation = {
|
|
8
12
|
hooks: {
|
|
9
13
|
processAssets: {
|
|
@@ -13,19 +17,12 @@ type Compilation = {
|
|
|
13
17
|
}, fn: (assets: Record<string, WebpackSource>) => void) => void;
|
|
14
18
|
};
|
|
15
19
|
};
|
|
16
|
-
/** Watch inputs webpack rebuilds per compilation (webpack 5 LazySet). */
|
|
17
20
|
fileDependencies: {
|
|
18
21
|
add(path: string): void;
|
|
19
22
|
};
|
|
20
|
-
/** Currently-absent paths whose creation must trigger a rebuild. */
|
|
21
23
|
missingDependencies: {
|
|
22
24
|
add(path: string): void;
|
|
23
25
|
};
|
|
24
|
-
/** Directory watch inputs (webpack 5 LazySet). External kit roots are
|
|
25
|
-
* registered here every compilation so UNIMPORTED creations still
|
|
26
|
-
* produce watch turns — webpack reports the DIRECTORY, and the
|
|
27
|
-
* session's root-dirty rewalk reconstructs the delta (openspec:
|
|
28
|
-
* external-source-watch-ingestion, design D3; probe E). */
|
|
29
26
|
contextDependencies: {
|
|
30
27
|
add(path: string): void;
|
|
31
28
|
};
|
|
@@ -34,17 +31,17 @@ type Compilation = {
|
|
|
34
31
|
} | undefined;
|
|
35
32
|
updateAsset(name: string, newSource: WebpackSource): void;
|
|
36
33
|
};
|
|
37
|
-
/** The slice of a webpack Module the needBuild predicate inspects. */
|
|
38
34
|
type CandidateModule = {
|
|
39
35
|
loaders?: Array<{
|
|
40
36
|
loader?: string;
|
|
41
37
|
}>;
|
|
42
38
|
};
|
|
43
39
|
type NeedBuildCallback = (err?: Error | null, result?: boolean) => void;
|
|
44
|
-
|
|
40
|
+
type NeedBuildContext = Record<never, never>;
|
|
41
|
+
type CompilationIdentity = Record<never, never>;
|
|
45
42
|
type NormalModuleCompilationHooks = {
|
|
46
43
|
needBuild?: {
|
|
47
|
-
tapAsync: (name: string, fn: (module: CandidateModule, context:
|
|
44
|
+
tapAsync: (name: string, fn: (module: CandidateModule, context: NeedBuildContext, callback: NeedBuildCallback) => void) => void;
|
|
48
45
|
};
|
|
49
46
|
};
|
|
50
47
|
type Compiler = {
|
|
@@ -59,7 +56,7 @@ type Compiler = {
|
|
|
59
56
|
tap: (name: string, fn: (compilation: Compilation) => void) => void;
|
|
60
57
|
};
|
|
61
58
|
thisCompilation: {
|
|
62
|
-
tap: (name: string, fn: (compilation:
|
|
59
|
+
tap: (name: string, fn: (compilation: CompilationIdentity) => void) => void;
|
|
63
60
|
};
|
|
64
61
|
};
|
|
65
62
|
context: string;
|
|
@@ -69,10 +66,10 @@ type Compiler = {
|
|
|
69
66
|
options?: {
|
|
70
67
|
name?: string;
|
|
71
68
|
resolve?: {
|
|
72
|
-
alias?:
|
|
69
|
+
alias?: WebpackAliasMap;
|
|
73
70
|
};
|
|
74
71
|
watchOptions?: {
|
|
75
|
-
ignored?:
|
|
72
|
+
ignored?: WatchIgnored;
|
|
76
73
|
};
|
|
77
74
|
};
|
|
78
75
|
webpack?: {
|
|
@@ -82,87 +79,38 @@ type Compiler = {
|
|
|
82
79
|
sources: {
|
|
83
80
|
RawSource: new (source: string) => WebpackSource;
|
|
84
81
|
};
|
|
85
|
-
/**
|
|
86
|
-
*
|
|
82
|
+
/** Read from the compiler instance, never a top-level webpack import —
|
|
83
|
+
* Next ships its own compiled webpack. */
|
|
87
84
|
NormalModule?: {
|
|
88
|
-
getCompilationHooks?: (compilation:
|
|
85
|
+
getCompilationHooks?: (compilation: CompilationIdentity) => NormalModuleCompilationHooks;
|
|
89
86
|
};
|
|
90
87
|
};
|
|
91
88
|
};
|
|
92
|
-
/**
|
|
93
|
-
* Webpack adapter for the extraction pipeline. All pipeline logic lives in
|
|
94
|
-
* the bundler-agnostic ExtractionSession — this class owns only the webpack
|
|
95
|
-
* wiring: hook registration, cross-compiler analysis dedup, alias
|
|
96
|
-
* harvesting from the compiler config, watch-event translation, and
|
|
97
|
-
* in-memory CSS asset replacement.
|
|
98
|
-
*/
|
|
99
89
|
export declare class AnimusWebpackPlugin {
|
|
100
90
|
private options;
|
|
101
91
|
private session;
|
|
102
92
|
private initialized;
|
|
103
93
|
private aliasesExtracted;
|
|
104
|
-
/** Loader paths counting as "the animus loader" in a module's chain —
|
|
105
|
-
* this package's own loader plus an optional harness override. */
|
|
106
94
|
private readonly animusLoaderPaths;
|
|
107
|
-
/** Epoch THIS compiler last proceeded with (set after every awaited
|
|
108
|
-
* watchRun transaction — including joined ones). Null until the
|
|
109
|
-
* initialization pipeline publishes. */
|
|
110
95
|
private lastBuiltEpoch;
|
|
111
|
-
/** Armed by watchRun when the transaction moved the epoch; captured and
|
|
112
|
-
* disarmed by the next compilation's needBuild wiring (design D1). */
|
|
113
96
|
private epochMovedForNextCompilation;
|
|
114
97
|
constructor(options: AnimusNextOptions);
|
|
115
|
-
/** True when the module's loader chain contains the animus loader — the
|
|
116
|
-
* needBuild fan-out predicate (design D1: no historical records; covers
|
|
117
|
-
* restored persistent-cache modules and raw passthroughs alike). */
|
|
118
98
|
private moduleUsesAnimusLoader;
|
|
119
|
-
/** Append the exact epoch artifact path to `watchOptions.ignored`,
|
|
120
|
-
* preserving the user's shape (design D2: the artifact participates in
|
|
121
|
-
* module snapshots via addDependency but never triggers live watch
|
|
122
|
-
* turns — no echo compilations). Session identity is process-claimed,
|
|
123
|
-
* so every compiler's plugin instance derives the SAME session-scoped
|
|
124
|
-
* path here regardless of which instance ends up owning the pipeline.
|
|
125
|
-
* Derived from the ONE root (session.rootDir, set at config time by
|
|
126
|
-
* with-animus); compiler.context is the fallback for bare-apply
|
|
127
|
-
* harnesses — identical when compiler.context === cwd. */
|
|
128
99
|
private appendEpochWatchIgnore;
|
|
129
|
-
/** Extract path aliases from webpack's resolve.alias config. Runs once per
|
|
130
|
-
* plugin instance — the resolve config is immutable after apply. */
|
|
131
100
|
private extractAliases;
|
|
132
101
|
apply(compiler: Compiler): void;
|
|
133
|
-
/**
|
|
134
|
-
* Reset analysis state for HMR geological reset.
|
|
135
|
-
*/
|
|
136
102
|
resetForHmr(): void;
|
|
137
|
-
/** Session identity (process-claimed) — with-animus derives the
|
|
138
|
-
* session-scoped alias/stub paths from it (design D2). */
|
|
139
103
|
get sessionId(): string;
|
|
140
|
-
/** Set the project root at CONFIG time (with-animus) — the ONE root all
|
|
141
|
-
* session-path derivations use. The compiler hooks ADOPT
|
|
142
|
-
* compiler.context only when no root was published (bare-apply
|
|
143
|
-
* harnesses); they never overwrite this. */
|
|
144
104
|
setRootDir(rootDir: string): void;
|
|
145
|
-
/** One warning per plugin instance for a context/root mismatch. */
|
|
146
105
|
private warnedRootDivergence;
|
|
147
|
-
/**
|
|
148
|
-
*
|
|
149
|
-
*
|
|
150
|
-
*
|
|
151
|
-
* silent overwrite re-keys sessionDir so the pipeline publishes
|
|
152
|
-
* artifacts where none of those consumers look. A disagreement is
|
|
153
|
-
* surfaced loudly instead (with-animus derives the root from Next's own
|
|
154
|
-
* `dir`, which equals compiler.context in real Next runs — a mismatch
|
|
155
|
-
* means a custom-webpack setup wired the plugin differently). */
|
|
106
|
+
/** Adopts `compiler.context` only when no config-time root exists: every
|
|
107
|
+
* frozen derivation came from that root, so an overwrite re-keys it.
|
|
108
|
+
* Stub path, css alias, virtual system-props target and watch-ignore are
|
|
109
|
+
* all frozen from it, so a disagreement is warned, never reconciled. */
|
|
156
110
|
private adoptCompilerContext;
|
|
157
|
-
/** This session's artifact directory, derived from the one root. */
|
|
158
111
|
get sessionDir(): string;
|
|
159
|
-
/** Expose options for the loader */
|
|
160
112
|
getOptions(): AnimusNextOptions;
|
|
161
|
-
/** Expose external package directories for webpack loader allowlisting.
|
|
162
|
-
* Falls back to shared globalThis state for non-owning compiler instances. */
|
|
163
113
|
getExternalPackageDirs(): string[];
|
|
164
|
-
/** Expose external package source entries for webpack resolve alias.
|
|
165
|
-
* Falls back to shared globalThis state for non-owning compiler instances. */
|
|
166
114
|
getExternalSourceEntries(): Map<string, string>;
|
|
167
115
|
}
|
|
168
116
|
//# sourceMappingURL=plugin.d.ts.map
|
package/dist/plugin.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS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AAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAEhC;IAED,OAAO,CAAC,oBAAoB,CAAS;IAErC;;;6EAGyE;IACzE,OAAO,CAAC,oBAAoB;IAqB5B,IAAI,UAAU,IAAI,MAAM,CAEvB;IAED,UAAU,IAAI,iBAAiB,CAE9B;IAED,sBAAsB,IAAI,MAAM,EAAE,CAIjC;IAED,wBAAwB,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAI9C;CACF"}
|
|
@@ -1,46 +1,26 @@
|
|
|
1
|
+
import { TURBOPACK_SYSTEM_PROPS_ID } from '@animus-ui/extract/session';
|
|
2
|
+
import type { TurbopackLoaderOptions } from './turbopack-loader';
|
|
1
3
|
import type { AnimusNextOptions } from './types';
|
|
2
|
-
/**
|
|
3
|
-
*
|
|
4
|
-
* Everything emitted here MUST be JSON-serializable — Turbopack forwards
|
|
5
|
-
* loader options across process boundaries and rejects live values.
|
|
6
|
-
*/
|
|
4
|
+
/** Everything emitted here must be JSON-serializable: Turbopack forwards
|
|
5
|
+
* loader options across process boundaries and rejects live values. */
|
|
7
6
|
export type TurbopackMode = 'off' | 'auto' | 'on';
|
|
8
7
|
export interface TurbopackRule {
|
|
9
8
|
loaders: Array<{
|
|
10
9
|
loader: string;
|
|
11
|
-
options:
|
|
10
|
+
options: TurbopackLoaderOptions;
|
|
12
11
|
}>;
|
|
13
12
|
}
|
|
14
13
|
export interface TurbopackConfigFragment {
|
|
15
14
|
rules: Record<string, TurbopackRule>;
|
|
16
15
|
resolveAlias: Record<string, string>;
|
|
17
16
|
}
|
|
18
|
-
/** The
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
* the loader
|
|
22
|
-
export declare const ANIMUS_TURBOPACK_RULE_GLOB
|
|
23
|
-
|
|
24
|
-
* (absolute-path imports are rejected there); resolveAlias maps it to the
|
|
25
|
-
* on-disk artifact. */
|
|
26
|
-
export declare const TURBOPACK_SYSTEM_PROPS_ID = "virtual:animus/system-props";
|
|
27
|
-
/**
|
|
28
|
-
* Resolve whether Turbopack wiring is active for this process. Default is
|
|
29
|
-
* `'auto'`: active exactly when the TURBOPACK environment variable is set
|
|
30
|
-
* (Next sets it for every Turbopack dev/build). The stable `turbopack`
|
|
31
|
-
* option wins over the deprecated `unstable_turbopack` alias.
|
|
32
|
-
*/
|
|
17
|
+
/** The one glob the loader registers under, derived from the shared engine
|
|
18
|
+
* extension set so the bundler families cannot drift. `.mjs` belongs in that
|
|
19
|
+
* set: an external package with no src/ is ingested through its dist entry
|
|
20
|
+
* and must still reach the loader, so do not trim it. */
|
|
21
|
+
export declare const ANIMUS_TURBOPACK_RULE_GLOB: string;
|
|
22
|
+
export { TURBOPACK_SYSTEM_PROPS_ID };
|
|
33
23
|
export declare function resolveTurbopackMode(options: AnimusNextOptions, env?: Record<string, string | undefined>): boolean;
|
|
34
|
-
/**
|
|
35
|
-
* Build the `turbopack` config fragment: one glob-keyed loader rule
|
|
36
|
-
* (file-level allowlisting lives in the loader via manifest lookup — Next 15
|
|
37
|
-
* rules have no condition algebra) plus resolve aliases for the virtual
|
|
38
|
-
* system-props id, the emitter's stylesheet id, and each collected external
|
|
39
|
-
* package specifier redirected to its source entry. Loader options carry
|
|
40
|
-
* the session identity (design D2: an options-borne, JSON-serializable
|
|
41
|
-
* Turbopack task input — restart-cold by construction), and the artifact
|
|
42
|
-
* aliases point into the session-scoped tree.
|
|
43
|
-
*/
|
|
44
24
|
export declare function buildTurbopackConfig(args: {
|
|
45
25
|
rootDir: string;
|
|
46
26
|
loaderPath: string;
|
|
@@ -49,12 +29,5 @@ export declare function buildTurbopackConfig(args: {
|
|
|
49
29
|
sessionId: string;
|
|
50
30
|
sessionDir: string;
|
|
51
31
|
}): TurbopackConfigFragment;
|
|
52
|
-
/**
|
|
53
|
-
* Locate the Turbopack loader module: built dist first, source fallback for
|
|
54
|
-
* in-repo development. CJS preferred — Turbopack's loader-runner follows
|
|
55
|
-
* the webpack loader contract (`module.exports = fn`), and the .cjs build
|
|
56
|
-
* is loadable by every runner version; ESM default-export acceptance is
|
|
57
|
-
* not guaranteed.
|
|
58
|
-
*/
|
|
59
32
|
export declare function resolveTurbopackLoaderPath(pluginDir: string): string;
|
|
60
33
|
//# sourceMappingURL=turbopack-config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"turbopack-config.d.ts","sourceRoot":"","sources":["../src/turbopack-config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"turbopack-config.d.ts","sourceRoot":"","sources":["../src/turbopack-config.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,yBAAyB,EAC1B,MAAM,4BAA4B,CAAC;AAKpC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD;wEACwE;AAExE,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,MAAM,GAAG,IAAI,CAAC;AAElD,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,KAAK,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,sBAAsB,CAAA;KAAE,CAAC,CAAC;CACrE;AAED,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IACrC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACtC;AAED;;;0DAG0D;AAC1D,eAAO,MAAM,0BAA0B,QAAiD,CAAC;AAEzF,OAAO,EAAE,yBAAyB,EAAE,CAAC;AAErC,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,iBAAiB,EAC1B,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAe,GACpD,OAAO,CAMT;AAMD,wBAAgB,oBAAoB,CAAC,IAAI,EAAE;IACzC,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB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