@tarojs/plugin-platform-harmony-cpp 4.1.4-beta.7 → 4.1.4-beta.8
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.d.ts +32 -0
- package/dist/index.js +5 -5
- package/dist/runtime/apischunk/index.d.ts +1580 -776
- package/dist/runtime/apischunk/index.js +400 -400
- package/package.json +27 -29
- package/static/@taro-oh/library-4.1.4-beta.8.har +0 -0
- package/static/@taro-oh/library-4.1.4-beta.7.har +0 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { HarmonyOS_ArkTS } from '@tarojs/plugin-platform-harmony-ets/dist';
|
|
2
|
+
import { IPluginContext, TConfig } from '@tarojs/service';
|
|
3
|
+
import { IHarmonyConfig } from '@tarojs/taro/types/compile';
|
|
4
|
+
|
|
5
|
+
declare class Harmony extends HarmonyOS_ArkTS {
|
|
6
|
+
option: IOptions;
|
|
7
|
+
platform: string;
|
|
8
|
+
runtimePath: string;
|
|
9
|
+
useETS: boolean;
|
|
10
|
+
useJSON5: boolean;
|
|
11
|
+
get context(): IPluginContext;
|
|
12
|
+
constructor(ctx: IPluginContext, config: TConfig, option: IOptions);
|
|
13
|
+
get harmonyPluginPath(): string;
|
|
14
|
+
get harmonyCppPluginPath(): string;
|
|
15
|
+
get apiLibrary(): string;
|
|
16
|
+
get componentLibrary(): string;
|
|
17
|
+
get runtimeLibrary(): string;
|
|
18
|
+
get runtimeFrameworkLibrary(): string;
|
|
19
|
+
get runtimeFrameworkReconciler(): string;
|
|
20
|
+
modifyPageConfig(): void;
|
|
21
|
+
updateModulePackage(outputRoot: string, ohPackage?: Exclude<IHarmonyConfig['ohPackage'], undefined>, ohpm?: string): void;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
interface IOptions {
|
|
25
|
+
useConfigName?: string;
|
|
26
|
+
/** @default "local" */
|
|
27
|
+
useChoreLibrary?: 'local' | 'remote' | false | string;
|
|
28
|
+
}
|
|
29
|
+
declare const _default: (ctx: IPluginContext, options?: IOptions) => void;
|
|
30
|
+
|
|
31
|
+
export { Harmony as HarmonyCPP, _default as default };
|
|
32
|
+
export type { IOptions };
|
package/dist/index.js
CHANGED
|
@@ -15,7 +15,7 @@ var utils = require('@tarojs/vite-runner/dist/utils');
|
|
|
15
15
|
var parseCssToStylesheet = require('@tarojs/parse-css-to-stylesheet');
|
|
16
16
|
var constants = require('@tarojs/vite-runner/dist/harmony/postcss/constants');
|
|
17
17
|
|
|
18
|
-
var version = "4.1.4-beta.
|
|
18
|
+
var version = "4.1.4-beta.8";
|
|
19
19
|
|
|
20
20
|
const PKG_NAME = '@taro-oh/library';
|
|
21
21
|
const PKG_VERSION = version;
|
|
@@ -170,16 +170,15 @@ function appPlugin () {
|
|
|
170
170
|
};
|
|
171
171
|
}
|
|
172
172
|
|
|
173
|
-
function injectEnv () {
|
|
174
|
-
const that = this;
|
|
173
|
+
function injectEnv (platform) {
|
|
175
174
|
const packageName = '@tarojs/taro';
|
|
176
175
|
const bindingName = 'Taro';
|
|
177
|
-
const businessId =
|
|
176
|
+
const businessId = platform.getConfig().defineConstants?.LOCATION_APIKEY?.replace(/^['"]|['"]$/g, '');
|
|
178
177
|
return {
|
|
179
178
|
name: 'taro:vite-add-method-env',
|
|
180
179
|
transform(code, id) {
|
|
181
180
|
const pluginContext = this;
|
|
182
|
-
const { runnerUtils } =
|
|
181
|
+
const { runnerUtils } = platform.context;
|
|
183
182
|
const { getViteHarmonyCompilerContext } = runnerUtils;
|
|
184
183
|
const compiler = getViteHarmonyCompilerContext(pluginContext);
|
|
185
184
|
const exts = Array.from(new Set(compiler?.frameworkExts.concat(helper.SCRIPT_EXT)));
|
|
@@ -1314,4 +1313,5 @@ function assertHarmonyConfig(ctx, config) {
|
|
|
1314
1313
|
}
|
|
1315
1314
|
}
|
|
1316
1315
|
|
|
1316
|
+
exports.HarmonyCPP = Harmony;
|
|
1317
1317
|
exports.default = index;
|