@odla-ai/cli 0.38.0 → 0.38.2
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/bin.cjs +10 -2
- package/dist/bin.cjs.map +1 -1
- package/dist/bin.js +1 -1
- package/dist/{chunk-DKOJBWRJ.js → chunk-HETCZVFB.js} +11 -3
- package/dist/chunk-HETCZVFB.js.map +1 -0
- package/dist/{cli-DZKEPGBZ.js → cli-LGYDXY5R.js} +2 -2
- package/dist/index.cjs +10 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-DKOJBWRJ.js.map +0 -1
- /package/dist/{cli-DZKEPGBZ.js.map → cli-LGYDXY5R.js.map} +0 -0
package/dist/bin.cjs
CHANGED
|
@@ -2118,7 +2118,11 @@ async function resolveOperatorContext(parsed, options = {}) {
|
|
|
2118
2118
|
const appEnvironment = clean2(import_node_process10.default.env.ODLA_APP_ID);
|
|
2119
2119
|
const appValue = appFlag ?? appEnvironment ?? profile.value?.app ?? loaded?.app.id ?? null;
|
|
2120
2120
|
const appSource = appFlag ? "flag" : appEnvironment ? "environment" : profile.value?.app ? "profile" : loaded ? "config" : "unresolved";
|
|
2121
|
-
if (appValue)
|
|
2121
|
+
if (appValue) {
|
|
2122
|
+
for (const id2 of options.allowAppList ? appValue.split(",") : [appValue]) {
|
|
2123
|
+
assertOperatorName(id2.trim(), "app");
|
|
2124
|
+
}
|
|
2125
|
+
}
|
|
2122
2126
|
if (options.requireApp && !appValue) {
|
|
2123
2127
|
throw new Error(
|
|
2124
2128
|
"app context is unresolved; pass --app <id>, set ODLA_APP_ID, select --context <name>, or run inside a project with odla.config.mjs"
|
|
@@ -14792,7 +14796,11 @@ async function revoke(parsed, deps, cfg, doFetch, out, json) {
|
|
|
14792
14796
|
if (json) out.log(JSON.stringify({ deviceId, revoked: true }, null, 2));
|
|
14793
14797
|
}
|
|
14794
14798
|
async function scopedToken2(parsed, deps, cfg, doFetch, out, label, scope = "app:device:enroll") {
|
|
14795
|
-
const { credentials } = await resolveOperatorContext(parsed, {
|
|
14799
|
+
const { credentials } = await resolveOperatorContext(parsed, {
|
|
14800
|
+
allowMissingConfig: true,
|
|
14801
|
+
// A device is granted the apps named in ONE approval, so --app is a list here.
|
|
14802
|
+
allowAppList: true
|
|
14803
|
+
});
|
|
14796
14804
|
const scopedTokenFile = credentials.scopedTokenFile;
|
|
14797
14805
|
return getScopedPlatformToken({
|
|
14798
14806
|
platform: cfg.platformUrl,
|