@cloudflare/workers-auth 0.5.1 → 0.5.3

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.
@@ -1,6 +1,6 @@
1
1
  import { a as ConfigStorage, A as AuthConfigStorage, U as UserAuthConfig, b as OAuthFlowContext, k as ProfileStore } from '../file-format-B1KgHuUR.mjs';
2
- import { C as CliDescriptor, U as UserPreferences, A as AuthContext, a as CloudflareAuth, K as KeyringPreferenceContext, S as SetKeyringPreferenceResult } from '../keyring-preference-CyZ9gPSe.mjs';
3
- export { b as CloudflareLoginProps } from '../keyring-preference-CyZ9gPSe.mjs';
2
+ import { C as CliDescriptor, U as UserPreferences, A as AuthContext, a as CloudflareAuth, K as KeyringPreferenceContext, S as SetKeyringPreferenceResult } from '../keyring-preference-BgjU5DM9.mjs';
3
+ export { b as CloudflareLoginProps } from '../keyring-preference-BgjU5DM9.mjs';
4
4
  import '@cloudflare/workers-utils';
5
5
 
6
6
  /**
package/dist/cf/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { createAuthConfigFileHelpers, createPreferences, createKeyringPreference, createFileStorage, createCloudflareAuth, createCloudflareProfileStore } from '../chunk-FVDIXAPS.mjs';
2
- import '../chunk-N7JTI7BC.mjs';
1
+ import { createAuthConfigFileHelpers, createPreferences, createKeyringPreference, createFileStorage, createCloudflareAuth, createCloudflareProfileStore } from '../chunk-7PS36DJW.mjs';
2
+ import '../chunk-5WRJ2ZUV.mjs';
3
3
  import { __name } from '../chunk-O6YSETKJ.mjs';
4
4
  import { getEnvironmentVariableFactory, getGlobalConfigPath, getCloudflareApiEnvironmentFromEnv } from '@cloudflare/workers-utils';
5
5
  import path from 'node:path';
@@ -160,7 +160,8 @@ var CF_CLI = {
160
160
  cliName: CF_CLI_NAME,
161
161
  commands: {
162
162
  login: "cf auth login",
163
- whoami: "cf auth whoami"
163
+ whoami: "cf auth whoami",
164
+ createProfile: "cf auth create"
164
165
  },
165
166
  keyringServiceName: CF_KEYRING_SERVICE_NAME,
166
167
  clientId: getClientIdFromEnv,
@@ -1470,7 +1470,7 @@ function createProfileStore(args) {
1470
1470
  throw new UserError(
1471
1471
  `No profile is directly bound to "${formatDirectoryForUserError(normalizedDir)}". The active profile "${parentBinding.profile}" is bound at "${formatDirectoryForUserError(
1472
1472
  parentBinding.dir
1473
- )}". Run \`wrangler auth deactivate\` from that directory instead.`,
1473
+ )}". Run the deactivate command from that directory instead.`,
1474
1474
  { telemetryMessage: "auth deactivate wrong directory" }
1475
1475
  );
1476
1476
  }
@@ -1549,7 +1549,7 @@ __name(createProfileStore, "createProfileStore");
1549
1549
  function validateProfileName(name) {
1550
1550
  if (RESERVED_PROFILE_NAMES.includes(name.toLowerCase())) {
1551
1551
  throw new UserError(
1552
- `"${name}" is a reserved profile name. Use \`wrangler login\` and \`wrangler logout\` to manage the default profile, which applies as a global fallback.`,
1552
+ `"${name}" is a reserved profile name. Use the login and logout commands to manage the default profile, which applies as a global fallback.`,
1553
1553
  { telemetryMessage: "auth profile reserved name" }
1554
1554
  );
1555
1555
  }
@@ -1,4 +1,4 @@
1
- import { stringifyFile, parseFile, dedent, createCredentialStorageContext, createOAuthFlow, getAuthFromEnv, createProfileStore, getCloudflareAccountIdFromEnv, getAuthConfigFilePath, getEncryptedAuthConfigFilePath, scrubEncryptedCredentials, validateProfileName, getCloudflareAuthUseKeyringFromEnv } from './chunk-N7JTI7BC.mjs';
1
+ import { stringifyFile, parseFile, dedent, createCredentialStorageContext, createOAuthFlow, getAuthFromEnv, createProfileStore, getCloudflareAccountIdFromEnv, getAuthConfigFilePath, getEncryptedAuthConfigFilePath, scrubEncryptedCredentials, validateProfileName, getCloudflareAuthUseKeyringFromEnv } from './chunk-5WRJ2ZUV.mjs';
2
2
  import { __name } from './chunk-O6YSETKJ.mjs';
3
3
  import { existsSync, rmSync, mkdirSync, writeFileSync, chmodSync, readFileSync as readFileSync$1, readdirSync } from 'node:fs';
4
4
  import path3 from 'node:path';
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export { EncryptedFileCredentialStore, FileCredentialStore, LinuxSecretToolKeyProvider, MacSecurityKeyProvider, NapiKeyringKeyProvider, PINNED_KEYRING_VERSION, PKCE_CHARSET, TEMPORARY_TERMS_NOTICE, TEMPORARY_TERMS_PROMPT, clearAccessCaches, clearCredentialStorageState, createCredentialStorageContext, createOAuthFlow, createProfileStore, decryptString, domainUsesAccess, encryptString, findKeyringBinding, generateAuthUrl, generateKey, generateRandomState, getAccessHeaders, getAuthConfigFilePath, getAuthFromEnv, getAuthUrlFromEnv, getCloudflareAPITokenFromEnv, getCloudflareAccountIdFromEnv, getCloudflareAuthUseKeyringFromEnv, getCloudflareGlobalAuthEmailFromEnv, getCloudflareGlobalAuthKeyFromEnv, getEncryptedAuthConfigFilePath, getKeyringAccountName, getKeyringInstallDir, installKeyringBindingSync, parseEncryptedEnvelope, probeSecretTool, readStoredAuthState, resetCredentialStorageState, resolveKeyProvider, scrubEncryptedCredentials, setKeyProviderFactoryForTesting, setKeyringEntryFactory, setLinuxSecretToolRunner, setMacSecurityCommandRunner, setNpmRunner, validateProfileName } from './chunk-N7JTI7BC.mjs';
1
+ export { EncryptedFileCredentialStore, FileCredentialStore, LinuxSecretToolKeyProvider, MacSecurityKeyProvider, NapiKeyringKeyProvider, PINNED_KEYRING_VERSION, PKCE_CHARSET, TEMPORARY_TERMS_NOTICE, TEMPORARY_TERMS_PROMPT, clearAccessCaches, clearCredentialStorageState, createCredentialStorageContext, createOAuthFlow, createProfileStore, decryptString, domainUsesAccess, encryptString, findKeyringBinding, generateAuthUrl, generateKey, generateRandomState, getAccessHeaders, getAuthConfigFilePath, getAuthFromEnv, getAuthUrlFromEnv, getCloudflareAPITokenFromEnv, getCloudflareAccountIdFromEnv, getCloudflareAuthUseKeyringFromEnv, getCloudflareGlobalAuthEmailFromEnv, getCloudflareGlobalAuthKeyFromEnv, getEncryptedAuthConfigFilePath, getKeyringAccountName, getKeyringInstallDir, installKeyringBindingSync, parseEncryptedEnvelope, probeSecretTool, readStoredAuthState, resetCredentialStorageState, resolveKeyProvider, scrubEncryptedCredentials, setKeyProviderFactoryForTesting, setKeyringEntryFactory, setLinuxSecretToolRunner, setMacSecurityCommandRunner, setNpmRunner, validateProfileName } from './chunk-5WRJ2ZUV.mjs';
2
2
  import './chunk-O6YSETKJ.mjs';
@@ -48,7 +48,7 @@ interface CliDescriptor {
48
48
  commands: {
49
49
  login: string;
50
50
  whoami: string;
51
- createProfile?: string;
51
+ createProfile: string;
52
52
  };
53
53
  /**
54
54
  * OS-keyring service identifier. Becomes the `-s` arg to macOS `security`,