How to use the @expo/xdl.Exp.getPublishInfoAsync function in @expo/xdl

To help you get started, we’ve selected a few @expo/xdl examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github expo / expo-cli / packages / expo-cli / src / commands / push-creds.ts View on Github external
async function _uploadWebPushCredientials(projectDir: string, options: VapidData) {
  const isGeneration = !(options.vapidPubkey && options.vapidPvtkey);

  log('Reading project configuration...');

  const {
    args: { remotePackageName },
  } = await Exp.getPublishInfoAsync(projectDir);

  log('Logging in...');

  const user = await UserManager.getCurrentUserAsync();
  const apiClient = ApiV2.clientForUser(user);

  if (isGeneration) {
    log("Generating and setting VAPID keys on Expo's servers...");
  } else {
    log("Uploading VAPID keys to Expo's servers...");
  }

  const results = await apiClient.putAsync(`credentials/push/web/${remotePackageName}`, {
    vapidPublicKey: options.vapidPubkey,
    vapidPrivateKey: options.vapidPvtkey,
    vapidSubject: options.vapidSubject,
github expo / expo-cli / packages / expo-cli / src / commands / fetch / ios.js View on Github external
async function fetchIosCerts(projectDir) {
  const {
    args: { remotePackageName },
  } = await Exp.getPublishInfoAsync(projectDir);

  const inProjectDir = filename => path.resolve(projectDir, filename);
  const credentialMetadata = await Credentials.getCredentialMetadataAsync(projectDir, 'ios');
  const { experienceName } = credentialMetadata;

  log(`Retrieving iOS credentials for ${credentialMetadata.experienceName}`);

  try {
    const {
      certP12,
      certPassword,
      certPrivateSigningKey,
      apnsKeyId,
      apnsKeyP8,
      pushP12,
      pushPassword,
github expo / expo-cli / packages / expo-cli / src / commands / publish.js View on Github external
const startOpts = { reset: options.clear, nonPersistent: true };
    if (options.maxWorkers) {
      startOpts.maxWorkers = options.maxWorkers;
    }

    await Project.startAsync(projectDir, startOpts, !options.quiet);
    startedOurOwn = true;
  }

  let recipient = await sendTo.getRecipient(options.sendTo);
  log(`Publishing to channel '${options.releaseChannel}'...`);

  const {
    args: { sdkVersion },
  } = await Exp.getPublishInfoAsync(projectDir);

  const buildStatus = await Project.buildAsync(projectDir, {
    mode: 'status',
    platform: 'all',
    current: true,
    releaseChannel: options.releaseChannel,
    sdkVersion,
  });

  const { exp } = await ProjectUtils.readConfigJsonAsync(projectDir);

  if (
    buildStatus.userHasBuiltExperienceBefore &&
    !buildStatus.userHasBuiltAppBefore &&
    !options.duringBuild &&
    !exp.isDetached
github expo / expo-cli / packages / expo-cli / src / commands / publish.js View on Github external
log('Unable to find an existing Expo CLI instance for this directory, starting a new one...');
    installExitHooks(projectDir);

    const startOpts = { reset: options.clear, nonPersistent: true };
    if (options.maxWorkers) {
      startOpts.maxWorkers = options.maxWorkers;
    }

    await Project.startAsync(projectDir, startOpts, !options.quiet);
    startedOurOwn = true;
  }

  let recipient = await sendTo.getRecipient(options.sendTo);
  log(`Publishing to channel '${options.releaseChannel}'...`);

  const { args: { sdkVersion } } = await Exp.getPublishInfoAsync(projectDir);

  const buildStatus = await Project.buildAsync(projectDir, {
    mode: 'status',
    platform: 'all',
    current: true,
    releaseChannel: options.releaseChannel,
    sdkVersion,
  });

  const { exp } = await readConfigJsonAsync(projectDir, { requireLocalConfig: true });

  if (
    buildStatus.userHasBuiltExperienceBefore &&
    !buildStatus.userHasBuiltAppBefore &&
    !options.duringBuild &&
    !exp.isDetached
github expo / expo / tools / expotools / src / Fixtures.ts View on Github external
transformerProxy(async (data, req, res) => {
      let publishInfo = (await Exp.getPublishInfoAsync(projectRoot)).args;
      let response = await _rewriteManifestAsync(
        publishInfo,
        req,
        data,
        originalDebuggerHost,
        newDebuggerHost,
        originalManifestUrl,
        newManifestUrl
      );
      let fixtureResponse = await _rewriteManifestAsync(
        publishInfo,
        req,
        data,
        originalDebuggerHost,
        DEBUGGER_HOST_PLACEHOLDER,
        originalManifestUrl,
github expo / expo-cli / packages / expo-cli / src / commands / webhooks.ts View on Github external
.asyncActionProjectDir(async (projectDir: string) => {
      const {
        args: { remoteFullPackageName: experienceName },
      } = await Exp.getPublishInfoAsync(projectDir);

      log(`Fetching webhooks for ${experienceName}`);

      try {
        const webhooks = await Webhooks.getWebhooksAsync(experienceName);
        if (!webhooks || webhooks.length === 0) {
          log(chalk.bold("You don't have any webhook set for this project."));
        } else {
          for (const webhook of webhooks) {
            const { event, url, secret } = webhook;
            log();
            log(`Webhook type: ${chalk.bold(event)}`);
            log(`Webhook URL: ${chalk.bold(url)}`);
            log(`Webhook secret: ${chalk.bold(secret)}`);
          }
        }