@geekmidas/cli 10.0.0-alpha.22 → 10.0.0-alpha.23
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/index.cjs +32 -24
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +32 -24
- package/dist/index.mjs.map +1 -1
- package/package.json +12 -12
package/dist/index.cjs
CHANGED
|
@@ -44,7 +44,7 @@ prompts = require_rolldown_runtime.__toESM(prompts, 1);
|
|
|
44
44
|
let _geekmidas_envkit = require("@geekmidas/envkit");
|
|
45
45
|
let _geekmidas_services = require("@geekmidas/services");
|
|
46
46
|
//#region package.json
|
|
47
|
-
var version = "10.0.0-alpha.
|
|
47
|
+
var version = "10.0.0-alpha.23";
|
|
48
48
|
//#endregion
|
|
49
49
|
//#region src/auth/credentials.ts
|
|
50
50
|
/**
|
|
@@ -8420,26 +8420,26 @@ function loadPackageJson() {
|
|
|
8420
8420
|
* Run: pnpm --filter @geekmidas/cli sync-versions
|
|
8421
8421
|
*/
|
|
8422
8422
|
const GEEKMIDAS_VERSIONS = {
|
|
8423
|
-
"@geekmidas/audit": "~10.0.0-alpha.
|
|
8424
|
-
"@geekmidas/auth": "~10.0.0-alpha.
|
|
8425
|
-
"@geekmidas/cache": "~10.0.0-alpha.
|
|
8426
|
-
"@geekmidas/client": "~10.0.0-alpha.
|
|
8427
|
-
"@geekmidas/cloud": "~10.0.0-alpha.
|
|
8428
|
-
"@geekmidas/constructs": "~10.0.0-alpha.
|
|
8429
|
-
"@geekmidas/db": "~10.0.0-alpha.
|
|
8430
|
-
"@geekmidas/emailkit": "~10.0.0-alpha.
|
|
8431
|
-
"@geekmidas/envkit": "~10.0.0-alpha.
|
|
8432
|
-
"@geekmidas/errors": "~10.0.0-alpha.
|
|
8433
|
-
"@geekmidas/events": "~10.0.0-alpha.
|
|
8434
|
-
"@geekmidas/logger": "~10.0.0-alpha.
|
|
8435
|
-
"@geekmidas/manifest": "~10.0.0-alpha.
|
|
8436
|
-
"@geekmidas/rate-limit": "~10.0.0-alpha.
|
|
8437
|
-
"@geekmidas/schema": "~10.0.0-alpha.
|
|
8438
|
-
"@geekmidas/services": "~10.0.0-alpha.
|
|
8439
|
-
"@geekmidas/storage": "~10.0.0-alpha.
|
|
8440
|
-
"@geekmidas/studio": "~10.0.0-alpha.
|
|
8441
|
-
"@geekmidas/telescope": "~10.0.0-alpha.
|
|
8442
|
-
"@geekmidas/testkit": "~10.0.0-alpha.
|
|
8423
|
+
"@geekmidas/audit": "~10.0.0-alpha.23",
|
|
8424
|
+
"@geekmidas/auth": "~10.0.0-alpha.23",
|
|
8425
|
+
"@geekmidas/cache": "~10.0.0-alpha.23",
|
|
8426
|
+
"@geekmidas/client": "~10.0.0-alpha.23",
|
|
8427
|
+
"@geekmidas/cloud": "~10.0.0-alpha.23",
|
|
8428
|
+
"@geekmidas/constructs": "~10.0.0-alpha.23",
|
|
8429
|
+
"@geekmidas/db": "~10.0.0-alpha.23",
|
|
8430
|
+
"@geekmidas/emailkit": "~10.0.0-alpha.23",
|
|
8431
|
+
"@geekmidas/envkit": "~10.0.0-alpha.23",
|
|
8432
|
+
"@geekmidas/errors": "~10.0.0-alpha.23",
|
|
8433
|
+
"@geekmidas/events": "~10.0.0-alpha.23",
|
|
8434
|
+
"@geekmidas/logger": "~10.0.0-alpha.23",
|
|
8435
|
+
"@geekmidas/manifest": "~10.0.0-alpha.23",
|
|
8436
|
+
"@geekmidas/rate-limit": "~10.0.0-alpha.23",
|
|
8437
|
+
"@geekmidas/schema": "~10.0.0-alpha.23",
|
|
8438
|
+
"@geekmidas/services": "~10.0.0-alpha.23",
|
|
8439
|
+
"@geekmidas/storage": "~10.0.0-alpha.23",
|
|
8440
|
+
"@geekmidas/studio": "~10.0.0-alpha.23",
|
|
8441
|
+
"@geekmidas/telescope": "~10.0.0-alpha.23",
|
|
8442
|
+
"@geekmidas/testkit": "~10.0.0-alpha.23",
|
|
8443
8443
|
"@geekmidas/cli": `~${loadPackageJson().version}`
|
|
8444
8444
|
};
|
|
8445
8445
|
//#endregion
|
|
@@ -15243,8 +15243,10 @@ async function writeTestHarness(options) {
|
|
|
15243
15243
|
cache: cacheBackendsIn(declared, options.cacheBackend)
|
|
15244
15244
|
});
|
|
15245
15245
|
const database = await databaseSource(declared, sources, endpoints.map(({ construct }) => construct));
|
|
15246
|
+
const files = [.../* @__PURE__ */ new Set([...Object.values(manifest.constructs).map(({ source }) => source.file), ...manifest.endpoints.map(({ source }) => source.file)])];
|
|
15246
15247
|
const harnessFor = (dir) => harnessModule({
|
|
15247
15248
|
dir,
|
|
15249
|
+
files,
|
|
15248
15250
|
database,
|
|
15249
15251
|
surfaces: surfaces.map((id, index) => ({
|
|
15250
15252
|
id,
|
|
@@ -15317,7 +15319,7 @@ function specifierFrom(dir, file) {
|
|
|
15317
15319
|
return path.startsWith(".") ? path : `./${path}`;
|
|
15318
15320
|
}
|
|
15319
15321
|
function harnessModule(options) {
|
|
15320
|
-
const { surfaces, auths, drivers, database, dir } = options;
|
|
15322
|
+
const { surfaces, auths, drivers, database, dir, files } = options;
|
|
15321
15323
|
const plugins = [...new Set(auths.flatMap(({ plugins }) => plugins))].sort();
|
|
15322
15324
|
const imports = [
|
|
15323
15325
|
`import {${database ? " type DatabaseOf," : ""} featureTest, loadTestManifest } from '@geekmidas/constructs/testing';`,
|
|
@@ -15326,7 +15328,8 @@ function harnessModule(options) {
|
|
|
15326
15328
|
...surfaces.map(({ id }) => `import { createApi as create${id} } from './clients/${(0, _geekmidas_manifest.kebabCase)(id)}.js';`),
|
|
15327
15329
|
...auths.length ? [`import { createAuthClient } from 'better-auth/client';`] : [],
|
|
15328
15330
|
...plugins.length ? [`import { ${plugins.join(", ")} } from 'better-auth/client/plugins';`] : [],
|
|
15329
|
-
...drivers.imports ? [drivers.imports] : []
|
|
15331
|
+
...drivers.imports ? [drivers.imports] : [],
|
|
15332
|
+
...files.map((file, index) => `import * as __module${index} from '${specifierFrom(dir, file)}';`)
|
|
15330
15333
|
];
|
|
15331
15334
|
const url = (id) => `manifest.env[${JSON.stringify((0, _geekmidas_manifest.provideKey)(id, "url"))}]!`;
|
|
15332
15335
|
const members = [...surfaces.map(({ id, secured }) => ` /** \`${id}\`, at ${(0, _geekmidas_manifest.provideKey)(id, "url")}. */
|
|
@@ -15352,8 +15355,13 @@ export class Browser extends TestBrowser {
|
|
|
15352
15355
|
${members.join("\n\n")}
|
|
15353
15356
|
}
|
|
15354
15357
|
|
|
15358
|
+
/** The app's modules, by the path the manifest records for each. */
|
|
15359
|
+
const modules = {
|
|
15360
|
+
${files.map((file, index) => `\t${JSON.stringify(file)}: __module${index},`).join("\n")}
|
|
15361
|
+
};
|
|
15362
|
+
|
|
15355
15363
|
/** \`it\`, for a test that drives the app the way it runs deployed. */
|
|
15356
|
-
export const it = featureTest${database ? "<Browser, DatabaseOf<typeof __database>>" : ""}({ manifest, browser: Browser });
|
|
15364
|
+
export const it = featureTest${database ? "<Browser, DatabaseOf<typeof __database>>" : ""}({ manifest, modules, browser: Browser });
|
|
15357
15365
|
`;
|
|
15358
15366
|
}
|
|
15359
15367
|
//#endregion
|