@apps-in-toss/plugins 0.0.22 → 0.0.23
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 +59 -0
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +58 -0
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -26541,6 +26541,7 @@ var require_validateReport = __commonJS({
|
|
|
26541
26541
|
// src/index.ts
|
|
26542
26542
|
var index_exports = {};
|
|
26543
26543
|
__export(index_exports, {
|
|
26544
|
+
analytics: () => analytics,
|
|
26544
26545
|
appsInToss: () => appsInToss,
|
|
26545
26546
|
appsInTossAppJson: () => appsInTossAppJson,
|
|
26546
26547
|
appsInTossEsbuildConfig: () => appsInTossEsbuildConfig,
|
|
@@ -27410,8 +27411,66 @@ function appsInToss(options2) {
|
|
|
27410
27411
|
appsInTossMetroConfig(envFilePath)
|
|
27411
27412
|
];
|
|
27412
27413
|
}
|
|
27414
|
+
|
|
27415
|
+
// src/analytics.ts
|
|
27416
|
+
init_cjs_shims();
|
|
27417
|
+
var INTERNAL_MEMBER_IDENT = "_reactInternalFiber";
|
|
27418
|
+
var REACT_NATIVE_RENDERER_DEV_MODULE = {
|
|
27419
|
+
modulePath: "react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js",
|
|
27420
|
+
transform: (code) => {
|
|
27421
|
+
return code.replace(
|
|
27422
|
+
"this._internalFiberInstanceHandleDEV = internalInstanceHandleDEV;",
|
|
27423
|
+
`this._internalFiberInstanceHandleDEV = this.${INTERNAL_MEMBER_IDENT} = internalInstanceHandleDEV;`
|
|
27424
|
+
);
|
|
27425
|
+
}
|
|
27426
|
+
};
|
|
27427
|
+
var REACT_NATIVE_RENDERER_PROD_MODULE = {
|
|
27428
|
+
modulePath: "react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js",
|
|
27429
|
+
transform: (code) => {
|
|
27430
|
+
return code.replace(
|
|
27431
|
+
` function ReactNativeFiberHostComponent(tag, viewConfig) {
|
|
27432
|
+
this._nativeTag = tag;
|
|
27433
|
+
this._children = [];
|
|
27434
|
+
this.viewConfig = viewConfig;
|
|
27435
|
+
}`,
|
|
27436
|
+
` function ReactNativeFiberHostComponent(tag, viewConfig, fiber) {
|
|
27437
|
+
this._nativeTag = tag;
|
|
27438
|
+
this._children = [];
|
|
27439
|
+
this.viewConfig = viewConfig;
|
|
27440
|
+
this.${INTERNAL_MEMBER_IDENT} = fiber;
|
|
27441
|
+
}`
|
|
27442
|
+
);
|
|
27443
|
+
}
|
|
27444
|
+
};
|
|
27445
|
+
function analytics() {
|
|
27446
|
+
let transformed = false;
|
|
27447
|
+
return {
|
|
27448
|
+
name: "apps-in-toss:analytics",
|
|
27449
|
+
build: {
|
|
27450
|
+
order: "pre",
|
|
27451
|
+
handler: () => {
|
|
27452
|
+
transformed = false;
|
|
27453
|
+
}
|
|
27454
|
+
},
|
|
27455
|
+
transformSync: (id, code) => {
|
|
27456
|
+
if (transformed) {
|
|
27457
|
+
return code;
|
|
27458
|
+
}
|
|
27459
|
+
if (id.endsWith(REACT_NATIVE_RENDERER_DEV_MODULE.modulePath)) {
|
|
27460
|
+
transformed = true;
|
|
27461
|
+
return REACT_NATIVE_RENDERER_DEV_MODULE.transform(code);
|
|
27462
|
+
}
|
|
27463
|
+
if (id.endsWith(REACT_NATIVE_RENDERER_PROD_MODULE.modulePath)) {
|
|
27464
|
+
transformed = true;
|
|
27465
|
+
return REACT_NATIVE_RENDERER_PROD_MODULE.transform(code);
|
|
27466
|
+
}
|
|
27467
|
+
return code;
|
|
27468
|
+
}
|
|
27469
|
+
};
|
|
27470
|
+
}
|
|
27413
27471
|
// Annotate the CommonJS export names for ESM import in node:
|
|
27414
27472
|
0 && (module.exports = {
|
|
27473
|
+
analytics,
|
|
27415
27474
|
appsInToss,
|
|
27416
27475
|
appsInTossAppJson,
|
|
27417
27476
|
appsInTossEsbuildConfig,
|
package/dist/index.d.cts
CHANGED
|
@@ -53,6 +53,8 @@ declare function appsInTossMetroConfig(envScriptPath: string): BedrockPluginCore
|
|
|
53
53
|
declare function appsInTossAppJson(options: Pick<AppsInTossPluginOptions, 'permissions'>): Promise<BedrockPluginCore>;
|
|
54
54
|
declare function appsInToss(options: AppsInTossPluginOptions): (BedrockPluginCore | Promise<BedrockPluginCore>)[];
|
|
55
55
|
|
|
56
|
+
declare function analytics(): BedrockPluginCore;
|
|
57
|
+
|
|
56
58
|
type BuildResult = {
|
|
57
59
|
jsFile: string;
|
|
58
60
|
platform: 'ios' | 'android';
|
|
@@ -81,4 +83,4 @@ declare function setupRuntimeSetupScript(config: Pick<AppsInTossPluginOptions, '
|
|
|
81
83
|
path: string;
|
|
82
84
|
};
|
|
83
85
|
|
|
84
|
-
export { type AppManifest, type AppsInTossPluginOptions, type BridgeTheme, type BuildResult, type CreateArtifactOptions, type Permission, appsInToss, appsInTossAppJson, appsInTossEsbuildConfig, appsInTossMetroConfig, createArtifact, setupRuntimeSetupScript, validateAppManifest, validateZip };
|
|
86
|
+
export { type AppManifest, type AppsInTossPluginOptions, type BridgeTheme, type BuildResult, type CreateArtifactOptions, type Permission, analytics, appsInToss, appsInTossAppJson, appsInTossEsbuildConfig, appsInTossMetroConfig, createArtifact, setupRuntimeSetupScript, validateAppManifest, validateZip };
|
package/dist/index.d.ts
CHANGED
|
@@ -53,6 +53,8 @@ declare function appsInTossMetroConfig(envScriptPath: string): BedrockPluginCore
|
|
|
53
53
|
declare function appsInTossAppJson(options: Pick<AppsInTossPluginOptions, 'permissions'>): Promise<BedrockPluginCore>;
|
|
54
54
|
declare function appsInToss(options: AppsInTossPluginOptions): (BedrockPluginCore | Promise<BedrockPluginCore>)[];
|
|
55
55
|
|
|
56
|
+
declare function analytics(): BedrockPluginCore;
|
|
57
|
+
|
|
56
58
|
type BuildResult = {
|
|
57
59
|
jsFile: string;
|
|
58
60
|
platform: 'ios' | 'android';
|
|
@@ -81,4 +83,4 @@ declare function setupRuntimeSetupScript(config: Pick<AppsInTossPluginOptions, '
|
|
|
81
83
|
path: string;
|
|
82
84
|
};
|
|
83
85
|
|
|
84
|
-
export { type AppManifest, type AppsInTossPluginOptions, type BridgeTheme, type BuildResult, type CreateArtifactOptions, type Permission, appsInToss, appsInTossAppJson, appsInTossEsbuildConfig, appsInTossMetroConfig, createArtifact, setupRuntimeSetupScript, validateAppManifest, validateZip };
|
|
86
|
+
export { type AppManifest, type AppsInTossPluginOptions, type BridgeTheme, type BuildResult, type CreateArtifactOptions, type Permission, analytics, appsInToss, appsInTossAppJson, appsInTossEsbuildConfig, appsInTossMetroConfig, createArtifact, setupRuntimeSetupScript, validateAppManifest, validateZip };
|
package/dist/index.js
CHANGED
|
@@ -27404,7 +27404,65 @@ function appsInToss(options2) {
|
|
|
27404
27404
|
appsInTossMetroConfig(envFilePath)
|
|
27405
27405
|
];
|
|
27406
27406
|
}
|
|
27407
|
+
|
|
27408
|
+
// src/analytics.ts
|
|
27409
|
+
init_esm_shims();
|
|
27410
|
+
var INTERNAL_MEMBER_IDENT = "_reactInternalFiber";
|
|
27411
|
+
var REACT_NATIVE_RENDERER_DEV_MODULE = {
|
|
27412
|
+
modulePath: "react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js",
|
|
27413
|
+
transform: (code) => {
|
|
27414
|
+
return code.replace(
|
|
27415
|
+
"this._internalFiberInstanceHandleDEV = internalInstanceHandleDEV;",
|
|
27416
|
+
`this._internalFiberInstanceHandleDEV = this.${INTERNAL_MEMBER_IDENT} = internalInstanceHandleDEV;`
|
|
27417
|
+
);
|
|
27418
|
+
}
|
|
27419
|
+
};
|
|
27420
|
+
var REACT_NATIVE_RENDERER_PROD_MODULE = {
|
|
27421
|
+
modulePath: "react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js",
|
|
27422
|
+
transform: (code) => {
|
|
27423
|
+
return code.replace(
|
|
27424
|
+
` function ReactNativeFiberHostComponent(tag, viewConfig) {
|
|
27425
|
+
this._nativeTag = tag;
|
|
27426
|
+
this._children = [];
|
|
27427
|
+
this.viewConfig = viewConfig;
|
|
27428
|
+
}`,
|
|
27429
|
+
` function ReactNativeFiberHostComponent(tag, viewConfig, fiber) {
|
|
27430
|
+
this._nativeTag = tag;
|
|
27431
|
+
this._children = [];
|
|
27432
|
+
this.viewConfig = viewConfig;
|
|
27433
|
+
this.${INTERNAL_MEMBER_IDENT} = fiber;
|
|
27434
|
+
}`
|
|
27435
|
+
);
|
|
27436
|
+
}
|
|
27437
|
+
};
|
|
27438
|
+
function analytics() {
|
|
27439
|
+
let transformed = false;
|
|
27440
|
+
return {
|
|
27441
|
+
name: "apps-in-toss:analytics",
|
|
27442
|
+
build: {
|
|
27443
|
+
order: "pre",
|
|
27444
|
+
handler: () => {
|
|
27445
|
+
transformed = false;
|
|
27446
|
+
}
|
|
27447
|
+
},
|
|
27448
|
+
transformSync: (id, code) => {
|
|
27449
|
+
if (transformed) {
|
|
27450
|
+
return code;
|
|
27451
|
+
}
|
|
27452
|
+
if (id.endsWith(REACT_NATIVE_RENDERER_DEV_MODULE.modulePath)) {
|
|
27453
|
+
transformed = true;
|
|
27454
|
+
return REACT_NATIVE_RENDERER_DEV_MODULE.transform(code);
|
|
27455
|
+
}
|
|
27456
|
+
if (id.endsWith(REACT_NATIVE_RENDERER_PROD_MODULE.modulePath)) {
|
|
27457
|
+
transformed = true;
|
|
27458
|
+
return REACT_NATIVE_RENDERER_PROD_MODULE.transform(code);
|
|
27459
|
+
}
|
|
27460
|
+
return code;
|
|
27461
|
+
}
|
|
27462
|
+
};
|
|
27463
|
+
}
|
|
27407
27464
|
export {
|
|
27465
|
+
analytics,
|
|
27408
27466
|
appsInToss,
|
|
27409
27467
|
appsInTossAppJson,
|
|
27410
27468
|
appsInTossEsbuildConfig,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apps-in-toss/plugins",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.23",
|
|
5
5
|
"description": "The plugins for Apps In Toss",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"prepack": "yarn build",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"connect": "^3.7.0",
|
|
32
32
|
"execa": "^9.5.2",
|
|
33
33
|
"picocolors": "^1.1.1",
|
|
34
|
-
"react-native-bedrock": "0.0.
|
|
34
|
+
"react-native-bedrock": "0.0.22",
|
|
35
35
|
"tsup": "^8.4.0",
|
|
36
36
|
"typescript": "4.9.5",
|
|
37
37
|
"typia": "^8.0.4",
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
"publishConfig": {
|
|
42
42
|
"access": "public"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "92c6637381f3fc20dfa1870075f22ef108c62873"
|
|
45
45
|
}
|