monoverse 0.0.3 → 0.0.4

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.
Files changed (2) hide show
  1. package/build/cli.js +342 -4
  2. package/package.json +18 -17
package/build/cli.js CHANGED
@@ -21899,6 +21899,345 @@ var require_express2 = __commonJS({
21899
21899
  }
21900
21900
  });
21901
21901
 
21902
+ // ../../node_modules/.pnpm/is-docker@2.2.1/node_modules/is-docker/index.js
21903
+ var require_is_docker = __commonJS({
21904
+ "../../node_modules/.pnpm/is-docker@2.2.1/node_modules/is-docker/index.js"(exports2, module2) {
21905
+ "use strict";
21906
+ var fs = require("fs");
21907
+ var isDocker;
21908
+ function hasDockerEnv() {
21909
+ try {
21910
+ fs.statSync("/.dockerenv");
21911
+ return true;
21912
+ } catch (_) {
21913
+ return false;
21914
+ }
21915
+ }
21916
+ function hasDockerCGroup() {
21917
+ try {
21918
+ return fs.readFileSync("/proc/self/cgroup", "utf8").includes("docker");
21919
+ } catch (_) {
21920
+ return false;
21921
+ }
21922
+ }
21923
+ module2.exports = () => {
21924
+ if (isDocker === void 0) {
21925
+ isDocker = hasDockerEnv() || hasDockerCGroup();
21926
+ }
21927
+ return isDocker;
21928
+ };
21929
+ }
21930
+ });
21931
+
21932
+ // ../../node_modules/.pnpm/is-wsl@2.2.0/node_modules/is-wsl/index.js
21933
+ var require_is_wsl = __commonJS({
21934
+ "../../node_modules/.pnpm/is-wsl@2.2.0/node_modules/is-wsl/index.js"(exports2, module2) {
21935
+ "use strict";
21936
+ var os = require("os");
21937
+ var fs = require("fs");
21938
+ var isDocker = require_is_docker();
21939
+ var isWsl = () => {
21940
+ if (process.platform !== "linux") {
21941
+ return false;
21942
+ }
21943
+ if (os.release().toLowerCase().includes("microsoft")) {
21944
+ if (isDocker()) {
21945
+ return false;
21946
+ }
21947
+ return true;
21948
+ }
21949
+ try {
21950
+ return fs.readFileSync("/proc/version", "utf8").toLowerCase().includes("microsoft") ? !isDocker() : false;
21951
+ } catch (_) {
21952
+ return false;
21953
+ }
21954
+ };
21955
+ if (process.env.__IS_WSL_TEST__) {
21956
+ module2.exports = isWsl;
21957
+ } else {
21958
+ module2.exports = isWsl();
21959
+ }
21960
+ }
21961
+ });
21962
+
21963
+ // ../../node_modules/.pnpm/define-lazy-prop@2.0.0/node_modules/define-lazy-prop/index.js
21964
+ var require_define_lazy_prop = __commonJS({
21965
+ "../../node_modules/.pnpm/define-lazy-prop@2.0.0/node_modules/define-lazy-prop/index.js"(exports2, module2) {
21966
+ "use strict";
21967
+ module2.exports = (object, propertyName, fn) => {
21968
+ const define2 = (value) => Object.defineProperty(object, propertyName, { value, enumerable: true, writable: true });
21969
+ Object.defineProperty(object, propertyName, {
21970
+ configurable: true,
21971
+ enumerable: true,
21972
+ get() {
21973
+ const result = fn();
21974
+ define2(result);
21975
+ return result;
21976
+ },
21977
+ set(value) {
21978
+ define2(value);
21979
+ }
21980
+ });
21981
+ return object;
21982
+ };
21983
+ }
21984
+ });
21985
+
21986
+ // ../../node_modules/.pnpm/open@8.4.2/node_modules/open/index.js
21987
+ var require_open = __commonJS({
21988
+ "../../node_modules/.pnpm/open@8.4.2/node_modules/open/index.js"(exports2, module2) {
21989
+ var path2 = require("path");
21990
+ var childProcess = require("child_process");
21991
+ var { promises: fs, constants: fsConstants } = require("fs");
21992
+ var isWsl = require_is_wsl();
21993
+ var isDocker = require_is_docker();
21994
+ var defineLazyProperty = require_define_lazy_prop();
21995
+ var localXdgOpenPath = path2.join(__dirname, "xdg-open");
21996
+ var { platform, arch } = process;
21997
+ var hasContainerEnv = () => {
21998
+ try {
21999
+ fs.statSync("/run/.containerenv");
22000
+ return true;
22001
+ } catch {
22002
+ return false;
22003
+ }
22004
+ };
22005
+ var cachedResult;
22006
+ function isInsideContainer() {
22007
+ if (cachedResult === void 0) {
22008
+ cachedResult = hasContainerEnv() || isDocker();
22009
+ }
22010
+ return cachedResult;
22011
+ }
22012
+ var getWslDrivesMountPoint = (() => {
22013
+ const defaultMountPoint = "/mnt/";
22014
+ let mountPoint;
22015
+ return async function() {
22016
+ if (mountPoint) {
22017
+ return mountPoint;
22018
+ }
22019
+ const configFilePath = "/etc/wsl.conf";
22020
+ let isConfigFileExists = false;
22021
+ try {
22022
+ await fs.access(configFilePath, fsConstants.F_OK);
22023
+ isConfigFileExists = true;
22024
+ } catch {
22025
+ }
22026
+ if (!isConfigFileExists) {
22027
+ return defaultMountPoint;
22028
+ }
22029
+ const configContent = await fs.readFile(configFilePath, { encoding: "utf8" });
22030
+ const configMountPoint = /(?<!#.*)root\s*=\s*(?<mountPoint>.*)/g.exec(configContent);
22031
+ if (!configMountPoint) {
22032
+ return defaultMountPoint;
22033
+ }
22034
+ mountPoint = configMountPoint.groups.mountPoint.trim();
22035
+ mountPoint = mountPoint.endsWith("/") ? mountPoint : `${mountPoint}/`;
22036
+ return mountPoint;
22037
+ };
22038
+ })();
22039
+ var pTryEach = async (array, mapper) => {
22040
+ let latestError;
22041
+ for (const item of array) {
22042
+ try {
22043
+ return await mapper(item);
22044
+ } catch (error) {
22045
+ latestError = error;
22046
+ }
22047
+ }
22048
+ throw latestError;
22049
+ };
22050
+ var baseOpen = async (options) => {
22051
+ options = {
22052
+ wait: false,
22053
+ background: false,
22054
+ newInstance: false,
22055
+ allowNonzeroExitCode: false,
22056
+ ...options
22057
+ };
22058
+ if (Array.isArray(options.app)) {
22059
+ return pTryEach(options.app, (singleApp) => baseOpen({
22060
+ ...options,
22061
+ app: singleApp
22062
+ }));
22063
+ }
22064
+ let { name: app2, arguments: appArguments = [] } = options.app || {};
22065
+ appArguments = [...appArguments];
22066
+ if (Array.isArray(app2)) {
22067
+ return pTryEach(app2, (appName) => baseOpen({
22068
+ ...options,
22069
+ app: {
22070
+ name: appName,
22071
+ arguments: appArguments
22072
+ }
22073
+ }));
22074
+ }
22075
+ let command;
22076
+ const cliArguments = [];
22077
+ const childProcessOptions = {};
22078
+ if (platform === "darwin") {
22079
+ command = "open";
22080
+ if (options.wait) {
22081
+ cliArguments.push("--wait-apps");
22082
+ }
22083
+ if (options.background) {
22084
+ cliArguments.push("--background");
22085
+ }
22086
+ if (options.newInstance) {
22087
+ cliArguments.push("--new");
22088
+ }
22089
+ if (app2) {
22090
+ cliArguments.push("-a", app2);
22091
+ }
22092
+ } else if (platform === "win32" || isWsl && !isInsideContainer() && !app2) {
22093
+ const mountPoint = await getWslDrivesMountPoint();
22094
+ command = isWsl ? `${mountPoint}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe` : `${process.env.SYSTEMROOT}\\System32\\WindowsPowerShell\\v1.0\\powershell`;
22095
+ cliArguments.push(
22096
+ "-NoProfile",
22097
+ "-NonInteractive",
22098
+ "\u2013ExecutionPolicy",
22099
+ "Bypass",
22100
+ "-EncodedCommand"
22101
+ );
22102
+ if (!isWsl) {
22103
+ childProcessOptions.windowsVerbatimArguments = true;
22104
+ }
22105
+ const encodedArguments = ["Start"];
22106
+ if (options.wait) {
22107
+ encodedArguments.push("-Wait");
22108
+ }
22109
+ if (app2) {
22110
+ encodedArguments.push(`"\`"${app2}\`""`, "-ArgumentList");
22111
+ if (options.target) {
22112
+ appArguments.unshift(options.target);
22113
+ }
22114
+ } else if (options.target) {
22115
+ encodedArguments.push(`"${options.target}"`);
22116
+ }
22117
+ if (appArguments.length > 0) {
22118
+ appArguments = appArguments.map((arg) => `"\`"${arg}\`""`);
22119
+ encodedArguments.push(appArguments.join(","));
22120
+ }
22121
+ options.target = Buffer.from(encodedArguments.join(" "), "utf16le").toString("base64");
22122
+ } else {
22123
+ if (app2) {
22124
+ command = app2;
22125
+ } else {
22126
+ const isBundled = !__dirname || __dirname === "/";
22127
+ let exeLocalXdgOpen = false;
22128
+ try {
22129
+ await fs.access(localXdgOpenPath, fsConstants.X_OK);
22130
+ exeLocalXdgOpen = true;
22131
+ } catch {
22132
+ }
22133
+ const useSystemXdgOpen = process.versions.electron || platform === "android" || isBundled || !exeLocalXdgOpen;
22134
+ command = useSystemXdgOpen ? "xdg-open" : localXdgOpenPath;
22135
+ }
22136
+ if (appArguments.length > 0) {
22137
+ cliArguments.push(...appArguments);
22138
+ }
22139
+ if (!options.wait) {
22140
+ childProcessOptions.stdio = "ignore";
22141
+ childProcessOptions.detached = true;
22142
+ }
22143
+ }
22144
+ if (options.target) {
22145
+ cliArguments.push(options.target);
22146
+ }
22147
+ if (platform === "darwin" && appArguments.length > 0) {
22148
+ cliArguments.push("--args", ...appArguments);
22149
+ }
22150
+ const subprocess = childProcess.spawn(command, cliArguments, childProcessOptions);
22151
+ if (options.wait) {
22152
+ return new Promise((resolve, reject) => {
22153
+ subprocess.once("error", reject);
22154
+ subprocess.once("close", (exitCode) => {
22155
+ if (!options.allowNonzeroExitCode && exitCode > 0) {
22156
+ reject(new Error(`Exited with code ${exitCode}`));
22157
+ return;
22158
+ }
22159
+ resolve(subprocess);
22160
+ });
22161
+ });
22162
+ }
22163
+ subprocess.unref();
22164
+ return subprocess;
22165
+ };
22166
+ var open = (target, options) => {
22167
+ if (typeof target !== "string") {
22168
+ throw new TypeError("Expected a `target`");
22169
+ }
22170
+ return baseOpen({
22171
+ ...options,
22172
+ target
22173
+ });
22174
+ };
22175
+ var openApp = (name, options) => {
22176
+ if (typeof name !== "string") {
22177
+ throw new TypeError("Expected a `name`");
22178
+ }
22179
+ const { arguments: appArguments = [] } = options || {};
22180
+ if (appArguments !== void 0 && appArguments !== null && !Array.isArray(appArguments)) {
22181
+ throw new TypeError("Expected `appArguments` as Array type");
22182
+ }
22183
+ return baseOpen({
22184
+ ...options,
22185
+ app: {
22186
+ name,
22187
+ arguments: appArguments
22188
+ }
22189
+ });
22190
+ };
22191
+ function detectArchBinary(binary) {
22192
+ if (typeof binary === "string" || Array.isArray(binary)) {
22193
+ return binary;
22194
+ }
22195
+ const { [arch]: archBinary } = binary;
22196
+ if (!archBinary) {
22197
+ throw new Error(`${arch} is not supported`);
22198
+ }
22199
+ return archBinary;
22200
+ }
22201
+ function detectPlatformBinary({ [platform]: platformBinary }, { wsl }) {
22202
+ if (wsl && isWsl) {
22203
+ return detectArchBinary(wsl);
22204
+ }
22205
+ if (!platformBinary) {
22206
+ throw new Error(`${platform} is not supported`);
22207
+ }
22208
+ return detectArchBinary(platformBinary);
22209
+ }
22210
+ var apps = {};
22211
+ defineLazyProperty(apps, "chrome", () => detectPlatformBinary({
22212
+ darwin: "google chrome",
22213
+ win32: "chrome",
22214
+ linux: ["google-chrome", "google-chrome-stable", "chromium"]
22215
+ }, {
22216
+ wsl: {
22217
+ ia32: "/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",
22218
+ x64: ["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe", "/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]
22219
+ }
22220
+ }));
22221
+ defineLazyProperty(apps, "firefox", () => detectPlatformBinary({
22222
+ darwin: "firefox",
22223
+ win32: "C:\\Program Files\\Mozilla Firefox\\firefox.exe",
22224
+ linux: "firefox"
22225
+ }, {
22226
+ wsl: "/mnt/c/Program Files/Mozilla Firefox/firefox.exe"
22227
+ }));
22228
+ defineLazyProperty(apps, "edge", () => detectPlatformBinary({
22229
+ darwin: "microsoft edge",
22230
+ win32: "msedge",
22231
+ linux: ["microsoft-edge", "microsoft-edge-dev"]
22232
+ }, {
22233
+ wsl: "/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"
22234
+ }));
22235
+ open.apps = apps;
22236
+ open.openApp = openApp;
22237
+ module2.exports = open;
22238
+ }
22239
+ });
22240
+
21902
22241
  // ../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/base64.js
21903
22242
  var require_base64 = __commonJS({
21904
22243
  "../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/base64.js"(exports2) {
@@ -94102,6 +94441,7 @@ Defaulting to \`null\`.`;
94102
94441
  var path = require("path");
94103
94442
  var http = require("http");
94104
94443
  var express = require_express2();
94444
+ var openLink = require_open();
94105
94445
  var { createRequestHandler } = require_dist3();
94106
94446
  var app = express();
94107
94447
  var server = http.createServer(app).listen(() => {
@@ -94111,10 +94451,8 @@ var server = http.createServer(app).listen(() => {
94111
94451
  app.use(express.static(staticPath));
94112
94452
  app.all("*", createRequestHandler({ build }));
94113
94453
  app.set("port", port);
94114
- console.log(
94115
- `Example app listening on port ${port}! Open at http://localhost:${port}`
94116
- );
94117
- console.log(`serving public files from ${staticPath}`);
94454
+ console.log(`Started at http://localhost:${port}`);
94455
+ openLink(`http://localhost:${port}`);
94118
94456
  });
94119
94457
  /*! Bundled license information:
94120
94458
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "monoverse",
3
3
  "private": false,
4
- "version": "0.0.3",
4
+ "version": "0.0.4",
5
5
  "sideEffects": false,
6
6
  "author": {
7
7
  "name": "Kishore",
@@ -17,33 +17,34 @@
17
17
  "dependencies": {
18
18
  "@remix-run/express": "^1.19.0",
19
19
  "cross-env": "^7.0.3",
20
- "express": "^4.18.2"
20
+ "express": "^4.18.2",
21
+ "open": "^8.4.2"
21
22
  },
22
23
  "devDependencies": {
23
- "@remix-run/react": "^1.18.1",
24
- "@remix-run/serve": "^1.18.1",
25
- "@remix-run/node": "^1.18.1",
26
- "query-registry": "^2.6.0",
27
- "p-limit": "^3.1.0",
28
- "lodash": "^4.17.21",
29
- "framer-motion": "^10.12.18",
30
- "clsx": "^1.2.1",
31
- "@types/semver": "^7.5.0",
32
24
  "@monorepo-utils/package-utils": "^2.10.2",
33
- "react": "^18.2.0",
34
- "react-dom": "^18.2.0",
35
- "semver": "^7.5.4",
36
- "semver-diff": "3.1.1",
37
- "tiny-invariant": "^1.3.1",
38
- "zod": "^3.21.4",
39
25
  "@remix-run/dev": "^1.18.1",
26
+ "@remix-run/node": "^1.18.1",
27
+ "@remix-run/react": "^1.18.1",
28
+ "@remix-run/serve": "^1.18.1",
40
29
  "@types/express": "^4.17.17",
41
30
  "@types/lodash": "^4.14.195",
42
31
  "@types/node": "^20.4.1",
43
32
  "@types/react": "^18.2.14",
44
33
  "@types/react-dom": "^18.2.6",
34
+ "@types/semver": "^7.5.0",
35
+ "clsx": "^1.2.1",
36
+ "framer-motion": "^10.12.18",
37
+ "lodash": "^4.17.21",
45
38
  "npm-run-all": "^4.1.5",
39
+ "p-limit": "^3.1.0",
40
+ "query-registry": "^2.6.0",
41
+ "react": "^18.2.0",
42
+ "react-dom": "^18.2.0",
43
+ "semver": "^7.5.4",
44
+ "semver-diff": "3.1.1",
45
+ "tiny-invariant": "^1.3.1",
46
46
  "typescript": "^5.1.6",
47
+ "zod": "^3.21.4",
47
48
  "@pkishorez/designsystem": "0.0.1",
48
49
  "@pkishorez/eslint": "0.0.1",
49
50
  "@pkishorez/vitest": "0.0.1"