@intlayer/config 9.0.0-canary.11 → 9.0.0-canary.14
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/cjs/bundle/index.cjs +1 -1
- package/dist/cjs/callers/base.cjs +42 -0
- package/dist/cjs/callers/base.cjs.map +1 -0
- package/dist/cjs/callers/compat/i18next.cjs +27 -0
- package/dist/cjs/callers/compat/i18next.cjs.map +1 -0
- package/dist/cjs/callers/compat/lingui.cjs +82 -0
- package/dist/cjs/callers/compat/lingui.cjs.map +1 -0
- package/dist/cjs/callers/compat/nextIntl.cjs +44 -0
- package/dist/cjs/callers/compat/nextIntl.cjs.map +1 -0
- package/dist/cjs/callers/compat/reactI18next.cjs +50 -0
- package/dist/cjs/callers/compat/reactI18next.cjs.map +1 -0
- package/dist/cjs/callers/compat/reactIntl.cjs +31 -0
- package/dist/cjs/callers/compat/reactIntl.cjs.map +1 -0
- package/dist/cjs/callers/compat/useIntl.cjs +46 -0
- package/dist/cjs/callers/compat/useIntl.cjs.map +1 -0
- package/dist/cjs/callers/compat/vueI18n.cjs +26 -0
- package/dist/cjs/callers/compat/vueI18n.cjs.map +1 -0
- package/dist/cjs/callers/index.cjs +87 -0
- package/dist/cjs/callers/index.cjs.map +1 -0
- package/dist/cjs/callers/transform.cjs +46 -0
- package/dist/cjs/callers/transform.cjs.map +1 -0
- package/dist/cjs/callers/types.cjs +0 -0
- package/dist/cjs/loadEnvFile.cjs +44 -7
- package/dist/cjs/loadEnvFile.cjs.map +1 -1
- package/dist/cjs/loadExternalFile/index.cjs +1 -0
- package/dist/cjs/loadExternalFile/loadExternalFile.cjs +7 -5
- package/dist/cjs/loadExternalFile/loadExternalFile.cjs.map +1 -1
- package/dist/cjs/loadExternalFile/parseFileContent.cjs +52 -17
- package/dist/cjs/loadExternalFile/parseFileContent.cjs.map +1 -1
- package/dist/cjs/loadExternalFile/transpileTSToCJS.cjs +99 -9
- package/dist/cjs/loadExternalFile/transpileTSToCJS.cjs.map +1 -1
- package/dist/esm/callers/base.mjs +40 -0
- package/dist/esm/callers/base.mjs.map +1 -0
- package/dist/esm/callers/compat/i18next.mjs +25 -0
- package/dist/esm/callers/compat/i18next.mjs.map +1 -0
- package/dist/esm/callers/compat/lingui.mjs +80 -0
- package/dist/esm/callers/compat/lingui.mjs.map +1 -0
- package/dist/esm/callers/compat/nextIntl.mjs +42 -0
- package/dist/esm/callers/compat/nextIntl.mjs.map +1 -0
- package/dist/esm/callers/compat/reactI18next.mjs +48 -0
- package/dist/esm/callers/compat/reactI18next.mjs.map +1 -0
- package/dist/esm/callers/compat/reactIntl.mjs +29 -0
- package/dist/esm/callers/compat/reactIntl.mjs.map +1 -0
- package/dist/esm/callers/compat/useIntl.mjs +44 -0
- package/dist/esm/callers/compat/useIntl.mjs.map +1 -0
- package/dist/esm/callers/compat/vueI18n.mjs +24 -0
- package/dist/esm/callers/compat/vueI18n.mjs.map +1 -0
- package/dist/esm/callers/index.mjs +72 -0
- package/dist/esm/callers/index.mjs.map +1 -0
- package/dist/esm/callers/transform.mjs +43 -0
- package/dist/esm/callers/transform.mjs.map +1 -0
- package/dist/esm/callers/types.mjs +0 -0
- package/dist/esm/loadEnvFile.mjs +45 -8
- package/dist/esm/loadEnvFile.mjs.map +1 -1
- package/dist/esm/loadExternalFile/index.mjs +2 -2
- package/dist/esm/loadExternalFile/loadExternalFile.mjs +7 -5
- package/dist/esm/loadExternalFile/loadExternalFile.mjs.map +1 -1
- package/dist/esm/loadExternalFile/parseFileContent.mjs +52 -17
- package/dist/esm/loadExternalFile/parseFileContent.mjs.map +1 -1
- package/dist/esm/loadExternalFile/transpileTSToCJS.mjs +102 -13
- package/dist/esm/loadExternalFile/transpileTSToCJS.mjs.map +1 -1
- package/dist/types/callers/base.d.ts +14 -0
- package/dist/types/callers/base.d.ts.map +1 -0
- package/dist/types/callers/compat/i18next.d.ts +12 -0
- package/dist/types/callers/compat/i18next.d.ts.map +1 -0
- package/dist/types/callers/compat/lingui.d.ts +7 -0
- package/dist/types/callers/compat/lingui.d.ts.map +1 -0
- package/dist/types/callers/compat/nextIntl.d.ts +13 -0
- package/dist/types/callers/compat/nextIntl.d.ts.map +1 -0
- package/dist/types/callers/compat/reactI18next.d.ts +15 -0
- package/dist/types/callers/compat/reactI18next.d.ts.map +1 -0
- package/dist/types/callers/compat/reactIntl.d.ts +16 -0
- package/dist/types/callers/compat/reactIntl.d.ts.map +1 -0
- package/dist/types/callers/compat/useIntl.d.ts +12 -0
- package/dist/types/callers/compat/useIntl.d.ts.map +1 -0
- package/dist/types/callers/compat/vueI18n.d.ts +12 -0
- package/dist/types/callers/compat/vueI18n.d.ts.map +1 -0
- package/dist/types/callers/index.d.ts +49 -0
- package/dist/types/callers/index.d.ts.map +1 -0
- package/dist/types/callers/transform.d.ts +57 -0
- package/dist/types/callers/transform.d.ts.map +1 -0
- package/dist/types/callers/types.d.ts +152 -0
- package/dist/types/callers/types.d.ts.map +1 -0
- package/dist/types/configFile/configurationSchema.d.ts +2 -2
- package/dist/types/loadEnvFile.d.ts +1 -1
- package/dist/types/loadEnvFile.d.ts.map +1 -1
- package/dist/types/loadExternalFile/index.d.ts +2 -2
- package/dist/types/loadExternalFile/loadExternalFile.d.ts.map +1 -1
- package/dist/types/loadExternalFile/parseFileContent.d.ts +9 -0
- package/dist/types/loadExternalFile/parseFileContent.d.ts.map +1 -1
- package/dist/types/loadExternalFile/transpileTSToCJS.d.ts +3 -1
- package/dist/types/loadExternalFile/transpileTSToCJS.d.ts.map +1 -1
- package/package.json +7 -2
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
//#region src/callers/types.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Shared caller-descriptor model.
|
|
4
|
+
*
|
|
5
|
+
* A "caller" is any function or JSX component through which application code
|
|
6
|
+
* reads intlayer content: the base getters (`useIntlayer`, `getIntlayer`) and
|
|
7
|
+
* every compat-adapter entry point (`useTranslation`, `useTranslations`,
|
|
8
|
+
* `formatMessage`, lingui's `t`/`_`, …).
|
|
9
|
+
*
|
|
10
|
+
* This registry is the single source of truth consumed by:
|
|
11
|
+
* - `@intlayer/babel` — field-usage analysis (purge/minify) and the optimize
|
|
12
|
+
* pass that rewrites caller invocations to `useDictionary(...)` /
|
|
13
|
+
* `useDictionaryDynamic(...)` with pre-imported dictionaries.
|
|
14
|
+
* - `@intlayer/swc` — the same optimize pass for Next.js builds; descriptors
|
|
15
|
+
* are serialised to the plugin's wire format via `toSwcExtraCallers`.
|
|
16
|
+
* - `@intlayer/lsp` and the VS Code extension — AST/regex matchers powering
|
|
17
|
+
* go-to-definition, references and completion.
|
|
18
|
+
* - Each compat package's bundler plugin — injects its library's descriptors
|
|
19
|
+
* into the pipelines above, so no compat-specific name is hard-coded in the
|
|
20
|
+
* core packages.
|
|
21
|
+
*/
|
|
22
|
+
/**
|
|
23
|
+
* Where a value (namespace/dictionary key, or key prefix) is read from a call
|
|
24
|
+
* expression.
|
|
25
|
+
*/
|
|
26
|
+
type CallerValueSource = /** Positional argument holding a string literal, e.g. `useTranslations('ns')`. */{
|
|
27
|
+
from: 'argument';
|
|
28
|
+
index: number;
|
|
29
|
+
} /** Property of an options-object argument, e.g. `useI18n({ namespace: 'ns' })`. */ | {
|
|
30
|
+
from: 'option';
|
|
31
|
+
argumentIndex: number;
|
|
32
|
+
property: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Compile-time constant — every call site reads the same dictionary.
|
|
36
|
+
* Used by single-catalog libraries such as lingui (`messages`).
|
|
37
|
+
*/
|
|
38
|
+
| {
|
|
39
|
+
from: 'fixed';
|
|
40
|
+
value: string;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* The first dot-segment of the message id passed to the call itself.
|
|
44
|
+
* Used by react-intl where `formatMessage({ id: 'home.title' })` encodes
|
|
45
|
+
* both the dictionary key (`home`) and the field path (`title`).
|
|
46
|
+
*/
|
|
47
|
+
| {
|
|
48
|
+
from: 'path-first-segment';
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* How translated content is obtained from the caller's result.
|
|
52
|
+
*
|
|
53
|
+
* - `'content'` — returns the dictionary content object; fields are
|
|
54
|
+
* read through member access or destructuring
|
|
55
|
+
* (`useIntlayer`, `getIntlayer`).
|
|
56
|
+
* - `'return-value'` — returns the translation function directly:
|
|
57
|
+
* `const t = useTranslations('ns'); t('key')`.
|
|
58
|
+
* - `'destructured-t'` — returns an object holding `t`:
|
|
59
|
+
* `const { t } = useTranslation('ns'); t('key')`.
|
|
60
|
+
* - `'self'` — the caller IS the translation call; the message id is
|
|
61
|
+
* one of its own arguments (`formatMessage`, `i18n._`).
|
|
62
|
+
* - `'all'` — field-level analysis is impossible; the whole
|
|
63
|
+
* dictionary is marked as used (Angular templates,
|
|
64
|
+
* lingui hashed ids).
|
|
65
|
+
*/
|
|
66
|
+
type CallerResultShape = 'content' | 'return-value' | 'destructured-t' | 'self' | 'all';
|
|
67
|
+
/**
|
|
68
|
+
* Full description of a single caller.
|
|
69
|
+
*/
|
|
70
|
+
type CallerDescriptor = {
|
|
71
|
+
/** Function or JSX component name, e.g. `'useTranslation'`, `'FormattedMessage'`. */callerName: string; /** Library identifier grouping related callers, e.g. `'react-i18next'`. */
|
|
72
|
+
library: string;
|
|
73
|
+
/**
|
|
74
|
+
* Module specifiers the caller may be imported from. Includes both the
|
|
75
|
+
* original library names and the `@intlayer/*` adapter equivalents, because
|
|
76
|
+
* bundler aliasing keeps user imports on the original names.
|
|
77
|
+
*/
|
|
78
|
+
importSources: string[];
|
|
79
|
+
/**
|
|
80
|
+
* When `true`, the caller only participates in matching when the analysed
|
|
81
|
+
* file imports from one of `importSources`. Used for generic names such as
|
|
82
|
+
* lingui's `t` / `_` that would otherwise produce false positives.
|
|
83
|
+
*/
|
|
84
|
+
requiresImport?: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* When `true`, the caller is also matched as a method on any object
|
|
87
|
+
* (`i18n.getFixedT(...)`, `intl.formatMessage(...)`) in addition to the
|
|
88
|
+
* bare-identifier form.
|
|
89
|
+
*/
|
|
90
|
+
matchAsMethod?: boolean; /** When `true`, also match the tagged-template form, e.g. lingui's ``t`…` ``. */
|
|
91
|
+
matchAsTaggedTemplate?: boolean;
|
|
92
|
+
/**
|
|
93
|
+
* When set, the caller is also matched as a JSX element whose attribute of
|
|
94
|
+
* this name holds the message id, e.g. `<FormattedMessage id="home.title" />`
|
|
95
|
+
* or `<Trans i18nKey="richText" />`.
|
|
96
|
+
*/
|
|
97
|
+
jsxIdAttribute?: string;
|
|
98
|
+
/**
|
|
99
|
+
* Optional JSX attribute carrying the namespace (dictionary key), e.g.
|
|
100
|
+
* react-i18next's `<Trans ns="home" i18nKey="title" />`.
|
|
101
|
+
*/
|
|
102
|
+
jsxNamespaceAttribute?: string;
|
|
103
|
+
/**
|
|
104
|
+
* Where the dictionary key is read from, tried in declaration order.
|
|
105
|
+
* The first source that yields a static string wins.
|
|
106
|
+
*/
|
|
107
|
+
namespaceSources: CallerValueSource[];
|
|
108
|
+
/**
|
|
109
|
+
* Optional key prefix prepended to every message path resolved through the
|
|
110
|
+
* returned translation function, e.g. `getFixedT(lng, ns, keyPrefix)` or
|
|
111
|
+
* `useTranslation(ns, { keyPrefix })`.
|
|
112
|
+
*/
|
|
113
|
+
keyPrefixSources?: CallerValueSource[];
|
|
114
|
+
/**
|
|
115
|
+
* When `true`, a dotted namespace is split at the first `.`: the first
|
|
116
|
+
* segment is the dictionary key and the rest becomes a key prefix.
|
|
117
|
+
* next-intl semantics: `useTranslations('about.counter')` reads the
|
|
118
|
+
* `about` dictionary with every `t()` path prefixed by `counter`.
|
|
119
|
+
*/
|
|
120
|
+
nestedNamespace?: boolean;
|
|
121
|
+
/**
|
|
122
|
+
* When `true`, the caller may be invoked without any namespace
|
|
123
|
+
* (`useTranslations()` root scope) — the dictionary key is then the first
|
|
124
|
+
* dot-segment of each message id passed to the returned `t()`.
|
|
125
|
+
*/
|
|
126
|
+
allowRootScope?: boolean; /** How translated content is obtained from the caller's result. */
|
|
127
|
+
translationFunction: CallerResultShape;
|
|
128
|
+
/**
|
|
129
|
+
* When `true`, the message id is a *flat* dictionary field that itself may
|
|
130
|
+
* contain dots (lingui catalogs). When unset, dotted ids map onto nested
|
|
131
|
+
* dictionary objects and are split into a field path.
|
|
132
|
+
*/
|
|
133
|
+
flatKey?: boolean;
|
|
134
|
+
/**
|
|
135
|
+
* Name of the dictionary-accepting replacement used by the optimize pass in
|
|
136
|
+
* static import mode, e.g. `'useDictionary'`. The replacement must be
|
|
137
|
+
* exported from every module in `importSources` (the compat package exports
|
|
138
|
+
* it; original-library specifiers are bundler-aliased to the compat package).
|
|
139
|
+
*
|
|
140
|
+
* Only callers with both replacements set — and matched as plain imported
|
|
141
|
+
* functions (not `matchAsMethod` / JSX) — are rewritten at build time.
|
|
142
|
+
*/
|
|
143
|
+
staticReplacement?: string;
|
|
144
|
+
/**
|
|
145
|
+
* Name of the dictionary-accepting replacement used by the optimize pass in
|
|
146
|
+
* dynamic/fetch import mode, e.g. `'useDictionaryDynamic'`.
|
|
147
|
+
*/
|
|
148
|
+
dynamicReplacement?: string;
|
|
149
|
+
};
|
|
150
|
+
//#endregion
|
|
151
|
+
export { CallerDescriptor, CallerResultShape, CallerValueSource };
|
|
152
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","names":[],"sources":["../../../src/callers/types.ts"],"mappings":";;AAyBA;;;;;;;;;;;;;;AAiCA;;;;;AAUA;;;;AAAA,KA3CY,iBAAA;EAEN,IAAA;EAAkB,KAAA;AAAA;EAElB,IAAA;EAAgB,aAAA;EAAuB,QAAA;AAAA;;;;;;EAKvC,IAAA;EAAe,KAAA;AAAA;;;;;;;EAMf,IAAA;AAAA;;;;;;;;;;;;;;;;;KAkBM,iBAAA;;;;KAUA,gBAAA;uFAEV,UAAA;EAEA,OAAA;;;;;;EAMA,aAAA;;;;;;EAMA,cAAA;;;;;;EAMA,aAAA;EAEA,qBAAA;;;;;;EAMA,cAAA;;;;;EAKA,qBAAA;;;;;EAKA,gBAAA,EAAkB,iBAAA;;;;;;EAMlB,gBAAA,GAAmB,iBAAA;;;;;;;EAOnB,eAAA;;;;;;EAMA,cAAA;EAEA,mBAAA,EAAqB,iBAAA;;;;;;EAMrB,OAAA;;;;;;;;;;EAUA,iBAAA;;;;;EAKA,kBAAA;AAAA"}
|
|
@@ -278,8 +278,8 @@ declare const buildSchema: z.ZodObject<{
|
|
|
278
278
|
}>>;
|
|
279
279
|
traversePattern: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
280
280
|
outputFormat: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
281
|
-
esm: "esm";
|
|
282
281
|
cjs: "cjs";
|
|
282
|
+
esm: "esm";
|
|
283
283
|
}>>>;
|
|
284
284
|
cache: z.ZodOptional<z.ZodBoolean>;
|
|
285
285
|
require: z.ZodOptional<z.ZodUnknown>;
|
|
@@ -476,8 +476,8 @@ declare const intlayerConfigSchema: z.ZodObject<{
|
|
|
476
476
|
}>>;
|
|
477
477
|
traversePattern: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
478
478
|
outputFormat: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
479
|
-
esm: "esm";
|
|
480
479
|
cjs: "cjs";
|
|
480
|
+
esm: "esm";
|
|
481
481
|
}>>>;
|
|
482
482
|
cache: z.ZodOptional<z.ZodBoolean>;
|
|
483
483
|
require: z.ZodOptional<z.ZodUnknown>;
|
|
@@ -4,7 +4,7 @@ type LoadEnvFileOptions = {
|
|
|
4
4
|
envFile?: string;
|
|
5
5
|
};
|
|
6
6
|
declare const getEnvFilePath: (env?: string, envFile?: string) => string | undefined;
|
|
7
|
-
declare const loadEnvFile: (options?: Partial<LoadEnvFileOptions>) =>
|
|
7
|
+
declare const loadEnvFile: (options?: Partial<LoadEnvFileOptions>) => Record<string, string>;
|
|
8
8
|
//#endregion
|
|
9
9
|
export { LoadEnvFileOptions, getEnvFilePath, loadEnvFile };
|
|
10
10
|
//# sourceMappingURL=loadEnvFile.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loadEnvFile.d.ts","names":[],"sources":["../../src/loadEnvFile.ts"],"mappings":";KAKY,kBAAA;EACV,GAAA;EACA,OAAA;AAAA;AAAA,cAGW,cAAA,GACX,GAAA,WACA,OAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"loadEnvFile.d.ts","names":[],"sources":["../../src/loadEnvFile.ts"],"mappings":";KAKY,kBAAA;EACV,GAAA;EACA,OAAA;AAAA;AAAA,cAGW,cAAA,GACX,GAAA,WACA,OAAA;AAAA,cAuCW,WAAA,GACX,OAAA,GAAU,OAAA,CAAQ,kBAAA,MACjB,MAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SandBoxContextOptions, getSandBoxContext, parseFileContent } from "./parseFileContent.js";
|
|
2
|
-
import { TranspileOptions, transpileTSToCJS, transpileTSToCJSSync } from "./transpileTSToCJS.js";
|
|
2
|
+
import { TranspileOptions, clearTranspileCache, transpileTSToCJS, transpileTSToCJSSync } from "./transpileTSToCJS.js";
|
|
3
3
|
import { LoadExternalFileOptions, loadExternalFile, loadExternalFileSync } from "./loadExternalFile.js";
|
|
4
4
|
import { ESBuildPlugin, bundleFile, bundleFileSync, getLoader } from "./bundleFile.js";
|
|
5
5
|
import { bundleJSFile } from "./bundleJSFile.js";
|
|
6
|
-
export { ESBuildPlugin, LoadExternalFileOptions, SandBoxContextOptions, TranspileOptions, bundleFile, bundleFileSync, bundleJSFile, getLoader, getSandBoxContext, loadExternalFile, loadExternalFileSync, parseFileContent, transpileTSToCJS, transpileTSToCJSSync };
|
|
6
|
+
export { ESBuildPlugin, LoadExternalFileOptions, SandBoxContextOptions, TranspileOptions, bundleFile, bundleFileSync, bundleJSFile, clearTranspileCache, getLoader, getSandBoxContext, loadExternalFile, loadExternalFileSync, parseFileContent, transpileTSToCJS, transpileTSToCJSSync };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loadExternalFile.d.ts","names":[],"sources":["../../../src/loadExternalFile/loadExternalFile.ts"],"mappings":";;;;;KAmBY,uBAAA;EACV,aAAA,GAAgB,cAAA;EAChB,YAAA,GAAe,gBAAA;EACf,QAAA;;;;;;;;EAQA,cAAA,GAAiB,MAAA;AAAA,IACf,qBAAA;;;;;;cAOS,oBAAA,GACX,QAAA,UACA,OAAA,GAAU,uBAAA;;;AAFZ;;;
|
|
1
|
+
{"version":3,"file":"loadExternalFile.d.ts","names":[],"sources":["../../../src/loadExternalFile/loadExternalFile.ts"],"mappings":";;;;;KAmBY,uBAAA;EACV,aAAA,GAAgB,cAAA;EAChB,YAAA,GAAe,gBAAA;EACf,QAAA;;;;;;;;EAQA,cAAA,GAAiB,MAAA;AAAA,IACf,qBAAA;;;;;;cAOS,oBAAA,GACX,QAAA,UACA,OAAA,GAAU,uBAAA;;;AAFZ;;;cAiGa,gBAAA,GACX,QAAA,UACA,OAAA,GAAU,uBAAA,KACT,OAAA"}
|
|
@@ -22,6 +22,15 @@ type SandBoxContextOptions = {
|
|
|
22
22
|
*/
|
|
23
23
|
aliases?: Record<string, string>;
|
|
24
24
|
};
|
|
25
|
+
/**
|
|
26
|
+
* Builds the global context handed to `runInNewContext`.
|
|
27
|
+
*
|
|
28
|
+
* SECURITY NOTE: this sandbox exists for global-scope hygiene (fresh
|
|
29
|
+
* module/exports, controlled env), NOT for containment. It exposes the real
|
|
30
|
+
* project `require`, a copy of `process`, and `fetch` — code executed here has
|
|
31
|
+
* full host privileges. Only ever run trusted, build-time project files
|
|
32
|
+
* (same trust model as `vite.config.ts`).
|
|
33
|
+
*/
|
|
25
34
|
declare const getSandBoxContext: (options?: SandBoxContextOptions) => Context;
|
|
26
35
|
declare const parseFileContent: <T>(fileContentString: string, options?: SandBoxContextOptions) => T | undefined;
|
|
27
36
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parseFileContent.d.ts","names":[],"sources":["../../../src/loadExternalFile/parseFileContent.ts"],"mappings":";;;;KAKY,qBAAA;EACV,aAAA,GAAgB,kBAAA;EAChB,cAAA,GAAiB,MAAA,CAAO,OAAA;EACxB,iBAAA,GAAoB,MAAA;;;;;;;;EAQpB,KAAA,GAAQ,MAAA;EAVR;;;;;;EAiBA,OAAA,GAAU,MAAA;AAAA
|
|
1
|
+
{"version":3,"file":"parseFileContent.d.ts","names":[],"sources":["../../../src/loadExternalFile/parseFileContent.ts"],"mappings":";;;;KAKY,qBAAA;EACV,aAAA,GAAgB,kBAAA;EAChB,cAAA,GAAiB,MAAA,CAAO,OAAA;EACxB,iBAAA,GAAoB,MAAA;;;;;;;;EAQpB,KAAA,GAAQ,MAAA;EAVR;;;;;;EAiBA,OAAA,GAAU,MAAA;AAAA;;;;;;AA2FZ;;;;cAAa,iBAAA,GAAqB,OAAA,GAAU,qBAAA,KAAwB,OAAA;AAAA,cAuEvD,gBAAA,MACX,iBAAA,UACA,OAAA,GAAU,qBAAA,KACT,CAAA"}
|
|
@@ -12,8 +12,10 @@ type TranspileOptions = BuildOptions & {
|
|
|
12
12
|
*/
|
|
13
13
|
esbuildInstance?: typeof _$esbuild;
|
|
14
14
|
};
|
|
15
|
+
/** Clears the in-memory transpilation cache (mainly for tests). */
|
|
16
|
+
declare const clearTranspileCache: () => void;
|
|
15
17
|
declare const transpileTSToCJSSync: (code: string, filePath: string, options?: TranspileOptions) => string | undefined;
|
|
16
18
|
declare const transpileTSToCJS: (code: string, filePath: string, options?: TranspileOptions) => Promise<string | undefined>;
|
|
17
19
|
//#endregion
|
|
18
|
-
export { TranspileOptions, transpileTSToCJS, transpileTSToCJSSync };
|
|
20
|
+
export { TranspileOptions, clearTranspileCache, transpileTSToCJS, transpileTSToCJSSync };
|
|
19
21
|
//# sourceMappingURL=transpileTSToCJS.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transpileTSToCJS.d.ts","names":[],"sources":["../../../src/loadExternalFile/transpileTSToCJS.ts"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"transpileTSToCJS.d.ts","names":[],"sources":["../../../src/loadExternalFile/transpileTSToCJS.ts"],"mappings":";;;;KAeY,gBAAA,GAAmB,YAAA;;;AAA/B;;;;;EAQE,eAAA,UARyC,SAAA;AAAA;;cAoL9B,mBAAA;AAAA,cAKA,oBAAA,GACX,IAAA,UACA,QAAA,UACA,OAAA,GAAU,gBAAA;AAAA,cAsFC,gBAAA,GACX,IAAA,UACA,QAAA,UACA,OAAA,GAAU,gBAAA,KACT,OAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intlayer/config",
|
|
3
|
-
"version": "9.0.0-canary.
|
|
3
|
+
"version": "9.0.0-canary.14",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Retrieve Intlayer configurations and manage environment variables for both server-side and client-side environments.",
|
|
6
6
|
"keywords": [
|
|
@@ -53,6 +53,11 @@
|
|
|
53
53
|
"require": "./dist/cjs/built.cjs",
|
|
54
54
|
"import": "./dist/esm/built.mjs"
|
|
55
55
|
},
|
|
56
|
+
"./callers": {
|
|
57
|
+
"types": "./dist/types/callers/index.d.ts",
|
|
58
|
+
"import": "./dist/esm/callers/index.mjs",
|
|
59
|
+
"require": "./dist/cjs/callers/index.cjs"
|
|
60
|
+
},
|
|
56
61
|
"./utils": {
|
|
57
62
|
"types": "./dist/types/utils/index.d.ts",
|
|
58
63
|
"require": "./dist/cjs/utils/index.cjs",
|
|
@@ -160,7 +165,7 @@
|
|
|
160
165
|
"typecheck": "tsc --noEmit --project tsconfig.types.json"
|
|
161
166
|
},
|
|
162
167
|
"dependencies": {
|
|
163
|
-
"@intlayer/types": "9.0.0-canary.
|
|
168
|
+
"@intlayer/types": "9.0.0-canary.14",
|
|
164
169
|
"defu": "6.1.7",
|
|
165
170
|
"dotenv": "17.4.2",
|
|
166
171
|
"esbuild": "0.28.1",
|