@module-federation/metro-plugin-rock 0.0.0-alpha.0 → 0.0.0-codex-node24-dev-node20-compat-ci-20260713063237

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 ADDED
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ var __webpack_require__ = {};
3
+ (()=>{
4
+ __webpack_require__.d = (exports1, getters, values)=>{
5
+ var define = (defs, kind)=>{
6
+ for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
7
+ enumerable: true,
8
+ [kind]: defs[key]
9
+ });
10
+ };
11
+ define(getters, "get");
12
+ define(values, "value");
13
+ };
14
+ })();
15
+ (()=>{
16
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
17
+ })();
18
+ (()=>{
19
+ __webpack_require__.r = (exports1)=>{
20
+ if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
21
+ value: 'Module'
22
+ });
23
+ Object.defineProperty(exports1, '__esModule', {
24
+ value: true
25
+ });
26
+ };
27
+ })();
28
+ var __webpack_exports__ = {};
29
+ __webpack_require__.r(__webpack_exports__);
30
+ __webpack_require__.d(__webpack_exports__, {
31
+ default: ()=>src,
32
+ pluginMetroModuleFederation: ()=>external_plugin_cjs_namespaceObject.pluginMetroModuleFederation
33
+ });
34
+ const external_plugin_cjs_namespaceObject = require("./plugin.cjs");
35
+ const src = external_plugin_cjs_namespaceObject.pluginMetroModuleFederation;
36
+ exports["default"] = __webpack_exports__["default"];
37
+ exports.pluginMetroModuleFederation = __webpack_exports__.pluginMetroModuleFederation;
38
+ for(var __rspack_i in __webpack_exports__)if (-1 === [
39
+ "default",
40
+ "pluginMetroModuleFederation"
41
+ ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
42
+ Object.defineProperty(exports, '__esModule', {
43
+ value: true
44
+ });
@@ -0,0 +1,3 @@
1
+ import { pluginMetroModuleFederation } from './plugin.js';
2
+ export { pluginMetroModuleFederation };
3
+ export default pluginMetroModuleFederation;
package/dist/index.js ADDED
@@ -0,0 +1,4 @@
1
+ import { pluginMetroModuleFederation } from "./plugin.js";
2
+ const src = pluginMetroModuleFederation;
3
+ export default src;
4
+ export { pluginMetroModuleFederation };
@@ -0,0 +1,97 @@
1
+ "use strict";
2
+ var __webpack_require__ = {};
3
+ (()=>{
4
+ __webpack_require__.n = (module)=>{
5
+ var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
6
+ __webpack_require__.d(getter, {
7
+ a: getter
8
+ });
9
+ return getter;
10
+ };
11
+ })();
12
+ (()=>{
13
+ __webpack_require__.d = (exports1, getters, values)=>{
14
+ var define = (defs, kind)=>{
15
+ for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
16
+ enumerable: true,
17
+ [kind]: defs[key]
18
+ });
19
+ };
20
+ define(getters, "get");
21
+ define(values, "value");
22
+ };
23
+ })();
24
+ (()=>{
25
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
26
+ })();
27
+ (()=>{
28
+ __webpack_require__.r = (exports1)=>{
29
+ if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
30
+ value: 'Module'
31
+ });
32
+ Object.defineProperty(exports1, '__esModule', {
33
+ value: true
34
+ });
35
+ };
36
+ })();
37
+ var __webpack_exports__ = {};
38
+ __webpack_require__.r(__webpack_exports__);
39
+ __webpack_require__.d(__webpack_exports__, {
40
+ pluginMetroModuleFederation: ()=>pluginMetroModuleFederation
41
+ });
42
+ const commands_namespaceObject = require("@module-federation/metro/commands");
43
+ var commands_default = /*#__PURE__*/ __webpack_require__.n(commands_namespaceObject);
44
+ const tools_namespaceObject = require("@rock-js/tools");
45
+ const pluginMetroModuleFederation = (pluginConfig = {})=>(api)=>{
46
+ api.registerCommand({
47
+ name: 'bundle-mf-host',
48
+ description: 'Bundles a Module Federation host',
49
+ action: async (args)=>{
50
+ const commandConfig = {
51
+ root: api.getProjectRoot(),
52
+ platforms: api.getPlatforms(),
53
+ reactNativePath: api.getReactNativePath(),
54
+ ...pluginConfig
55
+ };
56
+ tools_namespaceObject.logger.info(`Bundling Module Federation host for platform ${tools_namespaceObject.color.cyan(args.platform)}`);
57
+ await commands_default().bundleFederatedHost([], commandConfig, args);
58
+ tools_namespaceObject.logger.info('Bundle artifacts available at ...');
59
+ (0, tools_namespaceObject.outro)('Success 🎉.');
60
+ },
61
+ options: [
62
+ ...commands_default().bundleFederatedHostOptions,
63
+ {
64
+ name: '--config-cmd [string]',
65
+ description: "[Internal] A hack for Xcode build script pointing to wrong bundle command that recognizes this flag. Do not use."
66
+ }
67
+ ]
68
+ });
69
+ api.registerCommand({
70
+ name: 'bundle-mf-remote',
71
+ description: 'Bundles a Module Federation remote, including its container entry and all exposed modules for consumption by host applications',
72
+ action: async (args)=>{
73
+ const commandConfig = {
74
+ root: api.getProjectRoot(),
75
+ platforms: api.getPlatforms(),
76
+ reactNativePath: api.getReactNativePath(),
77
+ ...pluginConfig
78
+ };
79
+ tools_namespaceObject.logger.info(`Bundling Module Federation remote for platform ${tools_namespaceObject.color.cyan(args.platform)}`);
80
+ await commands_default().bundleFederatedRemote([], commandConfig, args);
81
+ tools_namespaceObject.logger.info('Bundle artifacts available at ...');
82
+ (0, tools_namespaceObject.outro)('Success 🎉.');
83
+ },
84
+ options: commands_default().bundleFederatedRemoteOptions
85
+ });
86
+ return {
87
+ name: '@module-federation/metro-plugin-rock',
88
+ description: 'Rock plugin for Module Federation with Metro'
89
+ };
90
+ };
91
+ exports.pluginMetroModuleFederation = __webpack_exports__.pluginMetroModuleFederation;
92
+ for(var __rspack_i in __webpack_exports__)if (-1 === [
93
+ "pluginMetroModuleFederation"
94
+ ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
95
+ Object.defineProperty(exports, '__esModule', {
96
+ value: true
97
+ });
@@ -0,0 +1,6 @@
1
+ import type { PluginApi, PluginOutput } from '@rock-js/config';
2
+ interface PluginConfig {
3
+ platforms?: Record<string, object>;
4
+ }
5
+ export declare const pluginMetroModuleFederation: (pluginConfig?: PluginConfig) => (api: PluginApi) => PluginOutput;
6
+ export {};
package/dist/plugin.js ADDED
@@ -0,0 +1,49 @@
1
+ import commands from "@module-federation/metro/commands";
2
+ import { color, logger, outro } from "@rock-js/tools";
3
+ const pluginMetroModuleFederation = (pluginConfig = {})=>(api)=>{
4
+ api.registerCommand({
5
+ name: 'bundle-mf-host',
6
+ description: 'Bundles a Module Federation host',
7
+ action: async (args)=>{
8
+ const commandConfig = {
9
+ root: api.getProjectRoot(),
10
+ platforms: api.getPlatforms(),
11
+ reactNativePath: api.getReactNativePath(),
12
+ ...pluginConfig
13
+ };
14
+ logger.info(`Bundling Module Federation host for platform ${color.cyan(args.platform)}`);
15
+ await commands.bundleFederatedHost([], commandConfig, args);
16
+ logger.info('Bundle artifacts available at ...');
17
+ outro('Success 🎉.');
18
+ },
19
+ options: [
20
+ ...commands.bundleFederatedHostOptions,
21
+ {
22
+ name: '--config-cmd [string]',
23
+ description: "[Internal] A hack for Xcode build script pointing to wrong bundle command that recognizes this flag. Do not use."
24
+ }
25
+ ]
26
+ });
27
+ api.registerCommand({
28
+ name: 'bundle-mf-remote',
29
+ description: 'Bundles a Module Federation remote, including its container entry and all exposed modules for consumption by host applications',
30
+ action: async (args)=>{
31
+ const commandConfig = {
32
+ root: api.getProjectRoot(),
33
+ platforms: api.getPlatforms(),
34
+ reactNativePath: api.getReactNativePath(),
35
+ ...pluginConfig
36
+ };
37
+ logger.info(`Bundling Module Federation remote for platform ${color.cyan(args.platform)}`);
38
+ await commands.bundleFederatedRemote([], commandConfig, args);
39
+ logger.info('Bundle artifacts available at ...');
40
+ outro('Success 🎉.');
41
+ },
42
+ options: commands.bundleFederatedRemoteOptions
43
+ });
44
+ return {
45
+ name: '@module-federation/metro-plugin-rock',
46
+ description: 'Rock plugin for Module Federation with Metro'
47
+ };
48
+ };
49
+ export { pluginMetroModuleFederation };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/metro-plugin-rock",
3
- "version": "0.0.0-alpha.0",
3
+ "version": "0.0.0-codex-node24-dev-node20-compat-ci-20260713063237",
4
4
  "description": "Metro Module Federation plugin for Rock",
5
5
  "keywords": [
6
6
  "rock",
@@ -31,23 +31,23 @@
31
31
  "require": "./dist/index.cjs",
32
32
  "default": "./dist/index.js"
33
33
  },
34
- "scripts": {
35
- "build": "rslib build",
36
- "typecheck": "tsc --noEmit",
37
- "lint": "ESLINT_USE_FLAT_CONFIG=false pnpm exec eslint --ignore-pattern node_modules \"**/*.{js,ts}\""
38
- },
39
34
  "peerDependencies": {
40
- "@module-federation/metro": "workspace:*",
41
- "@rock-js/tools": "^0.13.0"
35
+ "@rock-js/tools": "^0.13.0",
36
+ "@module-federation/metro": "0.0.0-codex-node24-dev-node20-compat-ci-20260713063237"
42
37
  },
43
38
  "devDependencies": {
44
- "@module-federation/metro": "workspace:*",
45
39
  "@rock-js/config": "^0.13.0",
46
40
  "@rock-js/tools": "^0.13.0",
47
- "@rslib/core": "^0.10.0",
41
+ "@rslib/core": "^0.23.2",
48
42
  "@typescript-eslint/eslint-plugin": "8.54.0",
49
43
  "@typescript-eslint/parser": "8.54.0",
50
44
  "@types/node": "^20.0.0",
51
- "typescript": "^5.8.3"
45
+ "typescript": "^6.0.3",
46
+ "@module-federation/metro": "0.0.0-codex-node24-dev-node20-compat-ci-20260713063237"
47
+ },
48
+ "scripts": {
49
+ "build": "rslib build",
50
+ "typecheck": "tsc --noEmit",
51
+ "lint": "ESLINT_USE_FLAT_CONFIG=false pnpm exec eslint --ignore-pattern node_modules \"**/*.{js,ts}\""
52
52
  }
53
- }
53
+ }