@rebasepro/cli 0.10.1-canary.7e63575 → 0.10.1-canary.8650626

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/bundle.d.ts CHANGED
@@ -20,24 +20,6 @@ export interface BuildBundleResult {
20
20
  manifest: RebaseBundleManifest;
21
21
  collectionCount: number;
22
22
  }
23
- /**
24
- * Whether the compiled config package exports a `storageAuthorize` hook.
25
- *
26
- * Recorded in the manifest so a host can refuse a deploy that would enable file
27
- * storage with no access model, rather than let the runtime's boot guard turn it
28
- * into a crash loop the developer cannot read.
29
- *
30
- * Read from the *compiled* index, deliberately: that is the exact module the
31
- * runtime imports and reads the export off, so this cannot disagree with what
32
- * actually happens at boot. It is a textual check rather than an import because
33
- * a freshly built bundle cannot resolve its own dependencies until it is
34
- * deployed — the same reason schema hashing reads source.
35
- *
36
- * Errs toward `false`: a missed detection costs a deploy rejection whose message
37
- * says exactly how to proceed, while a false positive would hand back the crash
38
- * loop this exists to prevent.
39
- */
40
- export declare function detectStorageAuthorize(compiledConfigDir: string): boolean;
41
23
  /**
42
24
  * Detect native code in the dependency closure.
43
25
  *
package/dist/index.es.js CHANGED
@@ -2981,43 +2981,6 @@ async function writeBundleTsconfig(projectRoot, outDir, includes, skipTypeCheck)
2981
2981
  return tsconfigPath;
2982
2982
  }
2983
2983
  /**
2984
- * Whether the compiled config package exports a `storageAuthorize` hook.
2985
- *
2986
- * Recorded in the manifest so a host can refuse a deploy that would enable file
2987
- * storage with no access model, rather than let the runtime's boot guard turn it
2988
- * into a crash loop the developer cannot read.
2989
- *
2990
- * Read from the *compiled* index, deliberately: that is the exact module the
2991
- * runtime imports and reads the export off, so this cannot disagree with what
2992
- * actually happens at boot. It is a textual check rather than an import because
2993
- * a freshly built bundle cannot resolve its own dependencies until it is
2994
- * deployed — the same reason schema hashing reads source.
2995
- *
2996
- * Errs toward `false`: a missed detection costs a deploy rejection whose message
2997
- * says exactly how to proceed, while a false positive would hand back the crash
2998
- * loop this exists to prevent.
2999
- */
3000
- function detectStorageAuthorize(compiledConfigDir) {
3001
- const indexPath = [
3002
- ".js",
3003
- ".mjs",
3004
- ".ts"
3005
- ].map((ext) => path.join(compiledConfigDir, `index${ext}`)).find((candidate) => fs.existsSync(candidate));
3006
- if (!indexPath) return false;
3007
- let source;
3008
- try {
3009
- source = fs.readFileSync(indexPath, "utf8");
3010
- } catch {
3011
- return false;
3012
- }
3013
- if (/\bexport\s+(?:async\s+)?(?:const|let|var|function)\s+storageAuthorize\b/.test(source)) return true;
3014
- for (const clause of source.matchAll(/\bexport\s*\{([^}]*)\}/g)) if (clause[1].split(",").map((entry) => {
3015
- const parts = entry.split(/\bas\b/);
3016
- return parts[parts.length - 1].trim();
3017
- }).includes("storageAuthorize")) return true;
3018
- return false;
3019
- }
3020
- /**
3021
2984
  * Detect native code in the dependency closure.
3022
2985
  *
3023
2986
  * Walks declared runtime dependencies breadth-first through `node_modules`,
@@ -3334,7 +3297,6 @@ async function buildBundle(options) {
3334
3297
  }
3335
3298
  const declared = collectDeclaredDependencies(projectRoot);
3336
3299
  const nativeModules = detectNativeDependencies(projectRoot, declared);
3337
- const declaresStorageAuthorize = detectStorageAuthorize(path.join(outDir, paths.config));
3338
3300
  const schemaOut = paths.schema.replace(/\.ts$/, ".js");
3339
3301
  const relative = (target) => fs.existsSync(path.join(outDir, target)) ? target : void 0;
3340
3302
  const manifest = {
@@ -3360,7 +3322,6 @@ async function buildBundle(options) {
3360
3322
  native: nativeModules.length > 0,
3361
3323
  nativeModules: nativeModules.length > 0 ? nativeModules : void 0
3362
3324
  },
3363
- storage: { authorize: declaresStorageAuthorize },
3364
3325
  deps: { declared },
3365
3326
  build: {
3366
3327
  cli: resolveCliVersion(),
@@ -4771,7 +4732,7 @@ async function linkCommand(rawArgs) {
4771
4732
  })).data;
4772
4733
  if (projects.length === 0) fail("No projects found for your account.", `Create one with ${chalk.bold("rebase cloud projects create")}.`);
4773
4734
  const { picked } = await inquirer.prompt([{
4774
- type: "select",
4735
+ type: "list",
4775
4736
  name: "picked",
4776
4737
  message: "Select a project to link:",
4777
4738
  choices: projects.map((p) => ({
@@ -4815,7 +4776,7 @@ async function selectOrgCommand(rawArgs) {
4815
4776
  let chosen = target ? orgs.find((o) => String(o.id) === target || o.slug === target) : void 0;
4816
4777
  if (!chosen && !target) {
4817
4778
  const { picked } = await inquirer.prompt([{
4818
- type: "select",
4779
+ type: "list",
4819
4780
  name: "picked",
4820
4781
  message: "Select the active organization:",
4821
4782
  choices: orgs.map((o) => ({
@@ -5092,7 +5053,6 @@ function packBundle(bundleDir, outPath) {
5092
5053
  const child = spawn("tar", [
5093
5054
  "-czf",
5094
5055
  outPath,
5095
- "--no-xattrs",
5096
5056
  "--exclude",
5097
5057
  "node_modules",
5098
5058
  "-C",
@@ -5728,7 +5688,7 @@ async function createDatabase(rawArgs) {
5728
5688
  let type = args["--type"];
5729
5689
  if (!type) {
5730
5690
  const { picked } = await inquirer.prompt([{
5731
- type: "select",
5691
+ type: "list",
5732
5692
  name: "picked",
5733
5693
  message: "Database type:",
5734
5694
  choices: [{
@@ -8966,6 +8926,6 @@ ${chalk.gray("Documentation: https://rebase.pro/docs")}
8966
8926
  `);
8967
8927
  }
8968
8928
  //#endregion
8969
- export { CURRENT_RUNTIME_RANGE, DEFAULT_BUNDLE_DIR, DEFAULT_CONFIG_DIR, DEFAULT_CRONS_DIR, DEFAULT_FUNCTIONS_DIR, DEFAULT_SCHEMA_FILE, MANIFEST_FILENAME, ManifestError, appsCommand, assessManagedCompatibility, authCommand, buildBundle, buildCommand, buildInitQuestions, buildStaticBundle, buildableApps, cloudCommand, collectDeclaredDependencies, configureEnvFile, createRebaseApp, dbCommand, detectNativeDependencies, detectPackageManager, detectStorageAuthorize, devCommand, doctorCommand, entry, findBackendApp, findBackendDir, findEnvFile, findFrontendDir, findProjectRoot, formatCdTarget, generateSdkCommand, getActiveBackendPlugin, getPMCommands, isPnpmAvailable, loadManifest, manifestExists, manifestPath, normalizeEsmSpecifiers, pnpmAvailabilityFromProbe, printInitHelp, requireBackendDir, requireProjectRoot, resetPnpmAvailabilityCache, resolveBackendPaths, resolveLocalBin, resolvePluginCliScript, resolveTsx, schemaCommand, startCommand, synthesizeManifest, validateManifest, validateProjectName, validateTsxInstallation, writeManifest };
8929
+ export { CURRENT_RUNTIME_RANGE, DEFAULT_BUNDLE_DIR, DEFAULT_CONFIG_DIR, DEFAULT_CRONS_DIR, DEFAULT_FUNCTIONS_DIR, DEFAULT_SCHEMA_FILE, MANIFEST_FILENAME, ManifestError, appsCommand, assessManagedCompatibility, authCommand, buildBundle, buildCommand, buildInitQuestions, buildStaticBundle, buildableApps, cloudCommand, collectDeclaredDependencies, configureEnvFile, createRebaseApp, dbCommand, detectNativeDependencies, detectPackageManager, devCommand, doctorCommand, entry, findBackendApp, findBackendDir, findEnvFile, findFrontendDir, findProjectRoot, formatCdTarget, generateSdkCommand, getActiveBackendPlugin, getPMCommands, isPnpmAvailable, loadManifest, manifestExists, manifestPath, normalizeEsmSpecifiers, pnpmAvailabilityFromProbe, printInitHelp, requireBackendDir, requireProjectRoot, resetPnpmAvailabilityCache, resolveBackendPaths, resolveLocalBin, resolvePluginCliScript, resolveTsx, schemaCommand, startCommand, synthesizeManifest, validateManifest, validateProjectName, validateTsxInstallation, writeManifest };
8970
8930
 
8971
8931
  //# sourceMappingURL=index.es.js.map