create-expo-module
Advanced tools
Comparing version 0.8.9-canary-20241211-61c49bd to 0.8.9
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
@@ -30,2 +7,3 @@ return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
exports.eventCreateExpoModule = exports.logEventAsync = exports.getTelemetryClient = void 0; | ||
const getUserState_1 = require("@expo/config/build/getUserState"); | ||
const json_file_1 = __importDefault(require("@expo/json-file")); | ||
@@ -35,4 +13,3 @@ const rudder_sdk_node_1 = __importDefault(require("@expo/rudder-sdk-node")); | ||
const getenv_1 = require("getenv"); | ||
const os_1 = __importStar(require("os")); | ||
const path = __importStar(require("path")); | ||
const os_1 = __importDefault(require("os")); | ||
const packageJson = require('../package.json'); | ||
@@ -60,23 +37,5 @@ /** If telemetry is disabled by the user */ | ||
exports.getTelemetryClient = getTelemetryClient; | ||
// The ~/.expo directory is used to store authentication sessions, | ||
// which are shared between EAS CLI and Expo CLI. | ||
function getExpoHomeDirectory() { | ||
const home = (0, os_1.homedir)(); | ||
if (process.env.__UNSAFE_EXPO_HOME_DIRECTORY) { | ||
return process.env.__UNSAFE_EXPO_HOME_DIRECTORY; | ||
} | ||
else if ((0, getenv_1.boolish)('EXPO_STAGING', false)) { | ||
return path.join(home, '.expo-staging'); | ||
} | ||
else if ((0, getenv_1.boolish)('EXPO_LOCAL', false)) { | ||
return path.join(home, '.expo-local'); | ||
} | ||
return path.join(home, '.expo'); | ||
} | ||
function getUserStatePath() { | ||
return path.join(getExpoHomeDirectory(), 'state.json'); | ||
} | ||
/** Get the randomly generated anonymous ID from the persistent storage, see @expo/cli */ | ||
async function getTelemetryIdAsync() { | ||
const settings = new json_file_1.default(getUserStatePath(), { | ||
const settings = new json_file_1.default((0, getUserState_1.getUserStatePath)(), { | ||
ensureDir: true, | ||
@@ -83,0 +42,0 @@ jsonParseErrorDefault: {}, |
{ | ||
"name": "create-expo-module", | ||
"version": "0.8.9-canary-20241211-61c49bd", | ||
"version": "0.8.9", | ||
"description": "The script to create the Expo module", | ||
@@ -36,4 +36,4 @@ "main": "build/create-expo-module.js", | ||
"dependencies": { | ||
"@expo/config": "11.0.0-canary-20241211-61c49bd", | ||
"@expo/json-file": "9.0.1-canary-20241211-61c49bd", | ||
"@expo/config": "~10.0.8", | ||
"@expo/json-file": "^9.0.1", | ||
"@expo/rudder-sdk-node": "^1.1.1", | ||
@@ -59,4 +59,5 @@ "@expo/spawn-async": "^1.7.2", | ||
"@types/prompts": "^2.4.9", | ||
"expo-module-scripts": "4.0.3-canary-20241211-61c49bd" | ||
} | ||
"expo-module-scripts": "^4.0.3" | ||
}, | ||
"gitHead": "986a4689b91f3efc527f7178a320b987c0005842" | ||
} |
@@ -0,1 +1,2 @@ | ||
import { getUserStatePath } from '@expo/config/build/getUserState'; | ||
import JsonFile from '@expo/json-file'; | ||
@@ -5,4 +6,3 @@ import TelemetryClient from '@expo/rudder-sdk-node'; | ||
import { boolish } from 'getenv'; | ||
import os, { homedir } from 'os'; | ||
import * as path from 'path'; | ||
import os from 'os'; | ||
@@ -41,20 +41,2 @@ import { CommandOptions } from './types'; | ||
// The ~/.expo directory is used to store authentication sessions, | ||
// which are shared between EAS CLI and Expo CLI. | ||
function getExpoHomeDirectory() { | ||
const home = homedir(); | ||
if (process.env.__UNSAFE_EXPO_HOME_DIRECTORY) { | ||
return process.env.__UNSAFE_EXPO_HOME_DIRECTORY; | ||
} else if (boolish('EXPO_STAGING', false)) { | ||
return path.join(home, '.expo-staging'); | ||
} else if (boolish('EXPO_LOCAL', false)) { | ||
return path.join(home, '.expo-local'); | ||
} | ||
return path.join(home, '.expo'); | ||
} | ||
function getUserStatePath() { | ||
return path.join(getExpoHomeDirectory(), 'state.json'); | ||
} | ||
/** Get the randomly generated anonymous ID from the persistent storage, see @expo/cli */ | ||
@@ -61,0 +43,0 @@ async function getTelemetryIdAsync() { |
Sorry, the diff of this file is not supported yet
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
7
147985
2158
+ Added@expo/config@10.0.8(transitive)
+ Added@expo/config-plugins@9.0.14(transitive)
+ Added@expo/config-types@52.0.3(transitive)
+ Added@expo/json-file@9.0.1(transitive)
+ Added@expo/plist@0.2.1(transitive)
- Removed@expo/config@11.0.0-canary-20241211-61c49bd(transitive)
- Removed@expo/config-plugins@9.0.13-canary-20241211-61c49bd(transitive)
- Removed@expo/config-types@53.0.0-canary-20241211-61c49bd(transitive)
- Removed@expo/json-file@9.0.1-canary-20241211-61c49bd(transitive)
- Removed@expo/plist@0.2.1-canary-20241211-61c49bd(transitive)
Updated@expo/config@~10.0.8
Updated@expo/json-file@^9.0.1