@prisma/composer-prisma-cloud 0.26.0-dev.2 → 0.26.0

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 (32) hide show
  1. package/dist/auth/pack.mjs +1 -1
  2. package/dist/auth/pack.mjs.map +1 -1
  3. package/dist/auth/testing.mjs +1 -1
  4. package/dist/auth/testing.mjs.map +1 -1
  5. package/dist/buckets-main.mjs +1 -1
  6. package/dist/buckets-main.mjs.map +1 -1
  7. package/dist/compute-main.mjs +1 -1
  8. package/dist/compute-main.mjs.map +1 -1
  9. package/dist/control.mjs +4 -4
  10. package/dist/control.mjs.map +1 -1
  11. package/dist/index.mjs +3 -3
  12. package/dist/local-target.d.mts +1 -7
  13. package/dist/local-target.d.mts.map +1 -1
  14. package/dist/local-target.mjs +10 -108
  15. package/dist/local-target.mjs.map +1 -1
  16. package/dist/postgres-main.mjs +1 -1
  17. package/dist/postgres-main.mjs.map +1 -1
  18. package/dist/{provisioned-edges-CPrUiJ1K--R7PIGoz.mjs → provisioned-edges-CPrUiJ1K-DKbfx776.mjs} +2 -2
  19. package/dist/{provisioned-edges-CPrUiJ1K--R7PIGoz.mjs.map → provisioned-edges-CPrUiJ1K-DKbfx776.mjs.map} +1 -1
  20. package/dist/{s3-credentials-resource-CySVP49N-CuDSPqsg.mjs → s3-credentials-resource-CySVP49N-BQLhUtvi.mjs} +5 -5
  21. package/dist/s3-credentials-resource-CySVP49N-BQLhUtvi.mjs.map +1 -0
  22. package/dist/{casts-DpaahrlC-Ykus3kCE.mjs → secret-C__qAfZr-CUc_Mgbg.mjs} +2 -42
  23. package/dist/secret-C__qAfZr-CUc_Mgbg.mjs.map +1 -0
  24. package/dist/{segments-DRPHe3kK-BNgikNpo.mjs → segments-D-anjQ84-BNgikNpo.mjs} +1 -1
  25. package/dist/{segments-DRPHe3kK-BNgikNpo.mjs.map → segments-D-anjQ84-BNgikNpo.mjs.map} +1 -1
  26. package/dist/{serializer-CE3hLPYz-DfUFvkm9.mjs → serializer-CE3hLPYz-BnSjO4w7.mjs} +42 -2
  27. package/dist/serializer-CE3hLPYz-BnSjO4w7.mjs.map +1 -0
  28. package/dist/testing.mjs +1 -1
  29. package/package.json +18 -18
  30. package/dist/casts-DpaahrlC-Ykus3kCE.mjs.map +0 -1
  31. package/dist/s3-credentials-resource-CySVP49N-CuDSPqsg.mjs.map +0 -1
  32. package/dist/serializer-CE3hLPYz-DfUFvkm9.mjs.map +0 -1
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import { d as serviceOrigin, i as generatedParam, l as paramName, n as envParam, o as isGeneratedParamSource, r as envSecret, s as isOriginParamSource, u as secretName } from "./casts-DpaahrlC-Ykus3kCE.mjs";
2
- import { f as stash, i as deserialize, l as readInput, m as stashProviderParams, n as configKey, p as stashInput, u as readOrigin } from "./serializer-CE3hLPYz-DfUFvkm9.mjs";
3
- import { a as provisionedEdges, i as STREAMS_API_KEY_ENV, o as streamsApiKeyNeed, r as STREAMS_API_KEY, t as RESERVED_PROVIDER_PARAMS } from "./provisioned-edges-CPrUiJ1K--R7PIGoz.mjs";
1
+ import { a as isGeneratedParamSource, c as paramName, l as secretName, n as envSecret, o as isOriginParamSource, r as generatedParam, t as envParam, u as serviceOrigin } from "./secret-C__qAfZr-CUc_Mgbg.mjs";
2
+ import { f as stash, i as deserialize, l as readInput, m as stashProviderParams, n as configKey, p as stashInput, u as readOrigin } from "./serializer-CE3hLPYz-BnSjO4w7.mjs";
3
+ import { a as provisionedEdges, i as STREAMS_API_KEY_ENV, o as streamsApiKeyNeed, r as STREAMS_API_KEY, t as RESERVED_PROVIDER_PARAMS } from "./provisioned-edges-CPrUiJ1K-DKbfx776.mjs";
4
4
  import { n as requiredPackHeadOf, t as requiredPackHead } from "./required-pack-head-CMMJ2LaU-CfWu5JMj.mjs";
5
5
  import { dependency, hydrateSync, number, resource, service, string } from "@prisma/composer";
6
6
  import { blindCast } from "@prisma/composer/casts";
@@ -1,10 +1,4 @@
1
1
  import { LocalTargetDescriptor } from "@prisma/composer/config";
2
- //#region ../../1-prisma-cloud/0-lowering/dev-emulators/dist/index.d.mts
3
- /** The environment variable that names the emulator registry root. */
4
- declare const EMULATORS_DIR_ENV = "PRISMA_COMPOSER_EMULATORS_DIR";
5
- /** `registryRoot`'s default: `$PRISMA_COMPOSER_EMULATORS_DIR` (an absolute path, normalised) when set, else `~/.prisma-composer/emulators/`. */
6
- declare function defaultRegistryRoot(): string;
7
- //#endregion
8
2
  //#region ../../1-prisma-cloud/1-extensions/target/dist/local-target.d.mts
9
3
  //#region src/local-target/descriptor.d.ts
10
4
  /**
@@ -14,5 +8,5 @@ declare function defaultRegistryRoot(): string;
14
8
  */
15
9
  declare function localTargetDescriptor(): LocalTargetDescriptor;
16
10
  //#endregion
17
- export { EMULATORS_DIR_ENV, defaultRegistryRoot as emulatorRegistryRoot, localTargetDescriptor };
11
+ export { localTargetDescriptor };
18
12
  //# sourceMappingURL=local-target.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"local-target.d.mts","names":[],"sources":["../../../1-prisma-cloud/0-lowering/dev-emulators/dist/index.d.mts","../../../1-prisma-cloud/1-extensions/target/dist/local-target.d.mts"],"mappings":";;;cAac;;iBAEG;;;;;;;;;iBCPA,yBAAyB"}
1
+ {"version":3,"file":"local-target.d.mts","names":[],"sources":["../../../1-prisma-cloud/1-extensions/target/dist/local-target.d.mts"],"mappings":";;;;;;;;iBAOiB,yBAAyB"}
@@ -1,5 +1,4 @@
1
- import { t as blindCast$1 } from "./casts-DpaahrlC-Ykus3kCE.mjs";
2
- import { C as ServiceKeyProvider, T as isWithin, b as Providers, c as PrismaCloudContainer, d as collectPreflightNames, h as prismaCloudContainerOf, i as OrmMigrationProvider, n as GeneratedParamProvider, p as deserialize, s as PgWarmProvider, u as S3CredentialsProvider, y as mintKeyPair } from "./s3-credentials-resource-CySVP49N-CuDSPqsg.mjs";
1
+ import { C as ServiceKeyProvider, T as isWithin, b as Providers, c as PrismaCloudContainer, d as collectPreflightNames, h as prismaCloudContainerOf, i as OrmMigrationProvider, n as GeneratedParamProvider, p as deserialize, s as PgWarmProvider, u as S3CredentialsProvider, y as mintKeyPair } from "./s3-credentials-resource-CySVP49N-BQLhUtvi.mjs";
3
2
  import { createRequire } from "node:module";
4
3
  import { blindCast } from "@prisma/composer/casts";
5
4
  import * as Effect from "effect/Effect";
@@ -58,90 +57,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
58
57
  }) : target, mod));
59
58
  var __require = /* #__PURE__ */ (() => createRequire(import.meta.url))();
60
59
  //#endregion
61
- //#region ../../0-framework/0-foundation/foundation/dist/errors.mjs
62
- /**
63
- * Returns an object with the key/value if value is defined, otherwise an empty object.
64
- *
65
- * Use with spread to conditionally include optional properties while satisfying
66
- * exactOptionalPropertyTypes. This is explicit about which properties are optional
67
- * and won't inadvertently strip other undefined values.
68
- *
69
- * @example
70
- * ```typescript
71
- * // Instead of:
72
- * const obj = {
73
- * required: 'value',
74
- * ...(optional ? { optional } : {}),
75
- * };
76
- *
77
- * // Use:
78
- * const obj = {
79
- * required: 'value',
80
- * ...ifDefined('optional', optional),
81
- * };
82
- * ```
83
- */
84
- function ifDefined(key, value) {
85
- return value !== void 0 ? blindCast$1({ [key]: value }) : {};
86
- }
87
- /**
88
- * Structured CLI error that contains all information needed for error envelopes.
89
- * Call sites throw these errors with full context.
90
- *
91
- * A `CliStructuredError` is a `StructuredError` (see
92
- * `./structured-error.ts`): `code` is a dotted
93
- * `NAMESPACE.SUBCODE` string, and the namespace prefix is the error's
94
- * category — there is no separate `domain` field. See ADR 239 in
95
- * prisma/prisma and composer's ADR-0044 for the namespace taxonomy.
96
- */
97
- var CliStructuredError = class extends Error {
98
- code;
99
- severity;
100
- constructor(code, summary, options) {
101
- super(summary, options?.cause !== void 0 ? { cause: options.cause } : void 0);
102
- this.name = "CliStructuredError";
103
- this.code = code;
104
- this.severity = options?.severity ?? "error";
105
- const fix = options?.fix === options?.why ? void 0 : options?.fix;
106
- const where = options?.where ? {
107
- ...ifDefined("path", options.where.path),
108
- ...ifDefined("line", options.where.line)
109
- } : void 0;
110
- Object.assign(this, {
111
- ...ifDefined("why", options?.why),
112
- ...ifDefined("fix", fix),
113
- ...ifDefined("where", where),
114
- ...ifDefined("meta", options?.meta),
115
- ...ifDefined("docsUrl", options?.docsUrl)
116
- });
117
- }
118
- /**
119
- * Converts this error to a CLI error envelope for output formatting.
120
- */
121
- toEnvelope() {
122
- return {
123
- ok: false,
124
- code: this.code,
125
- severity: this.severity,
126
- summary: this.message,
127
- ...ifDefined("why", this.why),
128
- ...ifDefined("fix", this.fix),
129
- ...ifDefined("where", this.where),
130
- ...ifDefined("meta", this.meta),
131
- ...ifDefined("docsUrl", this.docsUrl)
132
- };
133
- }
134
- /**
135
- * Type guard to check if an error is a CliStructuredError.
136
- * Uses duck-typing to work across module boundaries where instanceof may fail.
137
- */
138
- static is(error) {
139
- if (!(error instanceof Error)) return false;
140
- const candidate = blindCast$1(error);
141
- return candidate.name === "CliStructuredError" && typeof candidate.code === "string" && typeof candidate.toEnvelope === "function";
142
- }
143
- };
144
- //#endregion
145
60
  //#region ../../../node_modules/get-port/index.js
146
61
  var Locked = class extends Error {
147
62
  constructor(port) {
@@ -1564,7 +1479,7 @@ var require_adapter = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1564
1479
  };
1565
1480
  }));
1566
1481
  //#endregion
1567
- //#region ../../1-prisma-cloud/0-lowering/dev-emulators/dist/segments-DRPHe3kK.mjs
1482
+ //#region ../../1-prisma-cloud/0-lowering/dev-emulators/dist/segments-D-anjQ84.mjs
1568
1483
  var import_proper_lockfile = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
1569
1484
  const lockfile = require_lockfile();
1570
1485
  const { toPromise, toSync, toSyncOptions } = require_adapter();
@@ -1663,12 +1578,11 @@ async function readJsonFile(filePath, isValid) {
1663
1578
  * `unref()`'d child process that outlives whatever called `ensureDaemon` —
1664
1579
  * the registry is how a later call finds it again.
1665
1580
  *
1666
- * `registryRoot` defaults to `$PRISMA_COMPOSER_EMULATORS_DIR`, else
1667
- * `~/.prisma-composer/emulators/`, and governs every path this module
1668
- * manages for a given daemon: the registry JSON itself, the daemon's own
1669
- * state directory, and its stdio log file. The `{ registryRoot }` override
1670
- * exists solely so tests never touch the real home directory; production
1671
- * code never passes it.
1581
+ * `registryRoot` defaults to `~/.prisma-composer/emulators/` and governs
1582
+ * every path this module manages for a given daemon: the registry JSON
1583
+ * itself, the daemon's own state directory, and its stdio log file. The
1584
+ * `{ registryRoot }` override exists solely so tests never touch the real
1585
+ * home directory; production code never passes it.
1672
1586
  */
1673
1587
  const MIN_PORT = 4300;
1674
1588
  const MAX_PORT = 65535;
@@ -1711,21 +1625,9 @@ function isPackageJson(value) {
1711
1625
  function sleep(ms) {
1712
1626
  return new Promise((resolve) => setTimeout(resolve, ms));
1713
1627
  }
1714
- /** The environment variable that names the emulator registry root. */
1715
- const EMULATORS_DIR_ENV = "PRISMA_COMPOSER_EMULATORS_DIR";
1716
- /** `registryRoot`'s default: `$PRISMA_COMPOSER_EMULATORS_DIR` (an absolute path, normalised) when set, else `~/.prisma-composer/emulators/`. */
1628
+ /** `~/.prisma-composer/emulators/` — `registryRoot`'s default. */
1717
1629
  function defaultRegistryRoot() {
1718
- const dir = process.env[EMULATORS_DIR_ENV];
1719
- if (dir === void 0 || dir === "") return path$1.join(os$2.homedir(), ".prisma-composer", "emulators");
1720
- if (!path$1.isAbsolute(dir)) throw new CliStructuredError("DEV.EMULATORS_DIR_INVALID", `${EMULATORS_DIR_ENV} must be an absolute path; got "${dir}".`, {
1721
- why: "Every process that starts or reaches the local emulators resolves this directory, and a relative path would name a different one in each working directory.",
1722
- fix: `Set ${EMULATORS_DIR_ENV} to an absolute path (\`~\` is not expanded), or unset it to use ~/.prisma-composer/emulators.`,
1723
- meta: {
1724
- variable: EMULATORS_DIR_ENV,
1725
- value: dir
1726
- }
1727
- });
1728
- return path$1.resolve(dir);
1630
+ return path$1.join(os$2.homedir(), ".prisma-composer", "emulators");
1729
1631
  }
1730
1632
  /** `<registryRoot>/<name>.json`. */
1731
1633
  function registryFilePath(registryRoot, name) {
@@ -6411,6 +6313,6 @@ function localTargetDescriptor() {
6411
6313
  };
6412
6314
  }
6413
6315
  //#endregion
6414
- export { EMULATORS_DIR_ENV, defaultRegistryRoot as emulatorRegistryRoot, localTargetDescriptor };
6316
+ export { localTargetDescriptor };
6415
6317
 
6416
6318
  //# sourceMappingURL=local-target.mjs.map