@ohos-ports/rolldown 1.2.6-beta.0
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/LICENSE +25 -0
- package/README.md +11 -0
- package/THIRD-PARTY-LICENSE +33 -0
- package/bin/cli.mjs +11 -0
- package/dist/cli.d.mts +1 -0
- package/dist/cli.mjs +1208 -0
- package/dist/config.d.mts +26 -0
- package/dist/config.mjs +4 -0
- package/dist/experimental-default-runtime.mjs +116 -0
- package/dist/experimental-index.d.mts +324 -0
- package/dist/experimental-index.mjs +383 -0
- package/dist/experimental-runtime-base.mjs +95 -0
- package/dist/experimental-runtime-types.d.ts +177 -0
- package/dist/experimental-runtime.d.ts +177 -0
- package/dist/experimental-runtime.mjs +257 -0
- package/dist/filter-index.d.mts +196 -0
- package/dist/filter-index.mjs +376 -0
- package/dist/get-log-filter.d.mts +3 -0
- package/dist/get-log-filter.mjs +68 -0
- package/dist/index.d.mts +4 -0
- package/dist/index.mjs +56 -0
- package/dist/parallel-plugin-worker.d.mts +1 -0
- package/dist/parallel-plugin-worker.mjs +29 -0
- package/dist/parallel-plugin.d.mts +12 -0
- package/dist/parallel-plugin.mjs +6 -0
- package/dist/parse-ast-index.d.mts +30 -0
- package/dist/parse-ast-index.mjs +60 -0
- package/dist/plugins-index.d.mts +32 -0
- package/dist/plugins-index.mjs +40 -0
- package/dist/shared/binding-CtPG-2KR.mjs +675 -0
- package/dist/shared/binding-Og__jmUi.d.mts +2065 -0
- package/dist/shared/bindingify-input-options-4JJxbZl2.mjs +2416 -0
- package/dist/shared/constructors-Qrp2Xr6w.d.mts +35 -0
- package/dist/shared/constructors-ltBDfHX1.mjs +69 -0
- package/dist/shared/create-bundler-option-DSPiA5F7.mjs +3220 -0
- package/dist/shared/define-config-Demdg3_4.mjs +6 -0
- package/dist/shared/define-config-Nbz-lniw.d.mts +4101 -0
- package/dist/shared/dist-DKbukT1H.mjs +154 -0
- package/dist/shared/error-HDibX49O.mjs +85 -0
- package/dist/shared/get-log-filter-AjBknEEO.d.mts +34 -0
- package/dist/shared/load-config-BMUrE9HH.mjs +137 -0
- package/dist/shared/logging-xuHO4mAy.d.mts +50 -0
- package/dist/shared/logs-DmYCAKcW.mjs +192 -0
- package/dist/shared/misc-DOSKtd97.mjs +29 -0
- package/dist/shared/normalize-string-or-regex-DWz4it3p.mjs +68 -0
- package/dist/shared/parse-D0g29RgN.mjs +74 -0
- package/dist/shared/prompt-CH6TK0bC.mjs +885 -0
- package/dist/shared/resolve-tsconfig-CLYpUIZC.mjs +128 -0
- package/dist/shared/rolldown-C9Hfg50O.mjs +179 -0
- package/dist/shared/transform-DR4CXeQm.d.mts +152 -0
- package/dist/shared/watch-UbzgabQn.mjs +377 -0
- package/dist/utils-index.d.mts +375 -0
- package/dist/utils-index.mjs +2416 -0
- package/package.json +159 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { _ as BindingReplacePluginConfig } from "./shared/binding-Og__jmUi.mjs";
|
|
2
|
+
import { I as BuiltinPlugin } from "./shared/define-config-Nbz-lniw.mjs";
|
|
3
|
+
import { t as esmExternalRequirePlugin } from "./shared/constructors-Qrp2Xr6w.mjs";
|
|
4
|
+
//#region src/builtin-plugin/replace-plugin.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Replaces targeted strings in files while bundling.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* **Basic usage**
|
|
10
|
+
* ```js
|
|
11
|
+
* replacePlugin({
|
|
12
|
+
* 'process.env.NODE_ENV': JSON.stringify('production'),
|
|
13
|
+
* __buildVersion: 15
|
|
14
|
+
* })
|
|
15
|
+
* ```
|
|
16
|
+
* @example
|
|
17
|
+
* **With options**
|
|
18
|
+
* ```js
|
|
19
|
+
* replacePlugin({
|
|
20
|
+
* 'process.env.NODE_ENV': JSON.stringify('production'),
|
|
21
|
+
* __buildVersion: 15
|
|
22
|
+
* }, {
|
|
23
|
+
* preventAssignment: false,
|
|
24
|
+
* })
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* @see https://rolldown.rs/builtin-plugins/replace
|
|
28
|
+
* @category Builtin Plugins
|
|
29
|
+
*/
|
|
30
|
+
export declare function replacePlugin(values?: BindingReplacePluginConfig["values"], options?: Omit<BindingReplacePluginConfig, "values">): BuiltinPlugin;
|
|
31
|
+
//#endregion
|
|
32
|
+
export { esmExternalRequirePlugin };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { a as makeBuiltinPluginCallable, n as BuiltinPlugin } from "./shared/normalize-string-or-regex-DWz4it3p.mjs";
|
|
2
|
+
import { t as esmExternalRequirePlugin } from "./shared/constructors-ltBDfHX1.mjs";
|
|
3
|
+
//#region src/builtin-plugin/replace-plugin.ts
|
|
4
|
+
/**
|
|
5
|
+
* Replaces targeted strings in files while bundling.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* **Basic usage**
|
|
9
|
+
* ```js
|
|
10
|
+
* replacePlugin({
|
|
11
|
+
* 'process.env.NODE_ENV': JSON.stringify('production'),
|
|
12
|
+
* __buildVersion: 15
|
|
13
|
+
* })
|
|
14
|
+
* ```
|
|
15
|
+
* @example
|
|
16
|
+
* **With options**
|
|
17
|
+
* ```js
|
|
18
|
+
* replacePlugin({
|
|
19
|
+
* 'process.env.NODE_ENV': JSON.stringify('production'),
|
|
20
|
+
* __buildVersion: 15
|
|
21
|
+
* }, {
|
|
22
|
+
* preventAssignment: false,
|
|
23
|
+
* })
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* @see https://rolldown.rs/builtin-plugins/replace
|
|
27
|
+
* @category Builtin Plugins
|
|
28
|
+
*/
|
|
29
|
+
function replacePlugin(values = {}, options = {}) {
|
|
30
|
+
Object.keys(values).forEach((key) => {
|
|
31
|
+
const value = values[key];
|
|
32
|
+
if (typeof value !== "string") values[key] = String(value);
|
|
33
|
+
});
|
|
34
|
+
return makeBuiltinPluginCallable(new BuiltinPlugin("builtin:replace", {
|
|
35
|
+
...options,
|
|
36
|
+
values
|
|
37
|
+
}));
|
|
38
|
+
}
|
|
39
|
+
//#endregion
|
|
40
|
+
export { esmExternalRequirePlugin, replacePlugin };
|