@hypequery/cli 1.14.0 → 1.14.1

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 +1 @@
1
- {"version":3,"file":"deployment-runtime-artifact.d.ts","sourceRoot":"","sources":["../../src/utils/deployment-runtime-artifact.ts"],"names":[],"mappings":"AAyBA,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAC3B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,kBAAkB,EAAE,SAAS,MAAM,EAAE,CAAC;CAChD;AASD,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,OAAO,GAAG,SAAS,MAAM,EAAE,CA6BjF;AAuDD,wBAAsB,wBAAwB,CAC5C,OAAO,EAAE,MAAM,EACf,kBAAkB,EAAE,SAAS,MAAM,EAAE,EACrC,gBAAgB,SAAY,GAC3B,OAAO,CAAC,mBAAmB,CAAC,CAmD9B"}
1
+ {"version":3,"file":"deployment-runtime-artifact.d.ts","sourceRoot":"","sources":["../../src/utils/deployment-runtime-artifact.ts"],"names":[],"mappings":"AAyBA,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAC3B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,kBAAkB,EAAE,SAAS,MAAM,EAAE,CAAC;CAChD;AASD,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,OAAO,GAAG,SAAS,MAAM,EAAE,CA6BjF;AAiED,wBAAsB,wBAAwB,CAC5C,OAAO,EAAE,MAAM,EACf,kBAAkB,EAAE,SAAS,MAAM,EAAE,EACrC,gBAAgB,SAAY,GAC3B,OAAO,CAAC,mBAAmB,CAAC,CAmD9B"}
@@ -69,15 +69,25 @@ function runtimeEntrySource(apiSpecifier, runtimeEntrypoints, entrypointPrefix)
69
69
  ' ...(argument.context === undefined ? {} : { context: argument.context }),',
70
70
  ' ...(argument.request === undefined ? {} : { request: argument.request }),',
71
71
  ' ...(argument.requestId === undefined ? {} : { requestId: argument.requestId }),',
72
+ // A null principal means "no trusted principal"; forwarding it would skip the
73
+ // API's own auth strategies instead of falling through to them.
74
+ ' ...(argument.trustedAuth == null ? {} : { trustedAuth: argument.trustedAuth }),',
72
75
  ' });',
73
76
  ' }',
74
77
  ' const entry = api.queries?.[name];',
75
78
  ' const query = entry?.query;',
76
- ' if (typeof query === "function") return query;',
77
- ' if (query && typeof query === "object" && typeof query.run === "function") {',
78
- ' return query.run.bind(query);',
79
- ' }',
80
- ' throw new Error(`Runtime entrypoint ${name} is unavailable.`);',
79
+ ' let run;',
80
+ ' if (typeof query === "function") run = query;',
81
+ ' else if (query && typeof query === "object" && typeof query.run === "function") run = query.run.bind(query);',
82
+ ' if (!run) throw new Error(`Runtime entrypoint ${name} is unavailable.`);',
83
+ ' // Without a Serve execute() pipeline there is nothing to enforce roles, scopes,',
84
+ ' // or tenancy, so refuse a trusted principal instead of silently ignoring it.',
85
+ ' return (argument = {}) => {',
86
+ ' if (argument?.trustedAuth != null) {',
87
+ ' throw new Error(`Runtime entrypoint ${name} cannot enforce a trusted principal without a Serve execute() pipeline.`);',
88
+ ' }',
89
+ ' return run(argument);',
90
+ ' };',
81
91
  '};',
82
92
  `const runtimeEntries = Object.freeze(Object.fromEntries(${names}.map(name => [name, resolveQuery(name)])));`,
83
93
  `export const ${prefix[0]} = ${registryExpression};`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hypequery/cli",
3
- "version": "1.14.0",
3
+ "version": "1.14.1",
4
4
  "description": "Command-line interface for hypequery",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -19,8 +19,8 @@
19
19
  "open": "^10.0.0",
20
20
  "ora": "^8.0.1",
21
21
  "prompts": "^2.4.2",
22
- "@hypequery/deployment": "0.7.0",
23
- "@hypequery/protocol": "0.10.0"
22
+ "@hypequery/protocol": "0.10.0",
23
+ "@hypequery/deployment": "0.7.0"
24
24
  },
25
25
  "optionalDependencies": {
26
26
  "@napi-rs/keyring": "1.3.0"
@@ -34,7 +34,7 @@
34
34
  "@vitest/coverage-v8": "^3.2.6",
35
35
  "typescript": "^5.7.3",
36
36
  "vitest": "^3.2.6",
37
- "@hypequery/serve": "0.14.1"
37
+ "@hypequery/serve": "0.15.0"
38
38
  },
39
39
  "repository": {
40
40
  "type": "git",